Share the Knowledge
RSS icon Home icon
  • Apache: Redirecting http to https using a .htaccess file

    Posted on March 23rd, 2008 webmaster No comments         Print Print

    To redirect http traffic to https in Apache, create a .htaccess file with the following content:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

    Place the .htaccess file in your website directory and that should be it.

    NOTE: The rewrite module in Apache must be enabled for this to work. To check whether it is enabled, open your httpd.conf and make sure the line below is not commented:

    LoadModule rewrite_module modules/mod_rewrite.so

    If you’re running Apache on Windows, you won’t be able to create a file with a filename that starts with “.” so you will have to tell Apache to look for another file. To do so, simply open your httpd.conf and change the line:

    AccessFileName .htaccess

    to

    AccessFileName ht.acl .htaccess

    Instead of naming the file .htaccess, name it ht.acl. Restart Apache and it should work.

  • Windows cannot access the specified device, path, or file

    Posted on March 17th, 2008 webmaster No comments         Print Print

    Error Message:

    Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.

    If you get this error when you tried to run an executable file, simply do the following:

    1. Right-click on the file and choose Properties.
    2. In the General tab, click the Unblock button at the bottom and hit OK.

    Unblock File

    Try running the executable file again and it should now work.

  • Exchange 2007 SP1: Message rejected as spam by Content Filtering

    Posted on March 11th, 2008 webmaster 3 comments         Print Print

    Error Message:

    550 5.7.1 Message rejected as spam by Content Filtering.

    One of our users reported that after we applied Service Pack 1 and Update Rollup 1 to Exchange Server 2007, some of the emails that he has scheduled to send daily were getting rejected with the message above.

    I guess the integrated anti-spam in Exchange got updated as well.

    You can configure Content Filtering in Exchange to bypass specific users or domains.

    Open the Exchange Management Shell:

    # To check the Content Filter configuration, type in:

    Get-ContentFilterConfig

    # To set the Bypassed Senders (example):

    Set-ContentFilterConfig -BypassedSenders donotspamme@calazan.com, jdoe@abc.com

    # To set the Bypassed Sender Domains (example):

    Set-ContentFilterConfig -BypassedSenderDomains calazan.com, *.xyz.com

    Important Note: BypassedSenders and BypassedSenderDomains are multivalued properties. When you use the Set-ContentFilterConfig cmdlet, it will overwrite the values of those properties. If you just need to add more senders or domains, please follow the example below.

    # To add Bypassed Senders:

    $x = Get-ContentFilterConfig

    $x.BypassedSenders += “jsmith@google.com”, “bhope@yahoo.com”

    # To remove Bypassed Senders (can only be done one at a time):

    $x = Get-ContentFilterConfig

    $x.BypassedSenders -= “jsmith@google.com”

    # To empty the list:

    Set-ContentFilterConfig -BypassedSenders $null