Forcing lower case URLS in htaccess gives 500 server error

Discussion in 'Apache' started by scottwood1986, Apr 1, 2010.

  1. #1
    Hi all,

    Im getting a 500 server error when trying to add a 'force lower case URLS' rule tot he current .htaccess file.... Any ideas why? Im a newbie at apache stuff...



    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^signup$ signup.php
    RewriteRule ^account$ account.php
    RewriteRule ^logout$ logout.php
    RewriteRule ^login$ login.php
    RewriteRule ^recent-questions$ recent.php
    RewriteRule ^popular-questions$ popular.php
    RewriteRule ^confirmemail$ confirmemail.php
    RewriteRule ^confirmemail/(.*) confirmemail.php?code=$1
    RewriteRule ^ask$ ask.php
    RewriteRule ^member/(.*)/(.*) memberprofile.php?pid=$1&name=$2
    RewriteRule ^editaccount$ editaccount.php
    RewriteRule ^changeemail$ changeemail.php
    RewriteRule ^changepass$ changepass.php
    RewriteRule ^top-experts$ top-experts.php
    RewriteRule ^search$ search.php
    RewriteRule ^rss/recent$ rss_recent.php
    RewriteRule ^rss/popular$ rss_popular.php
    RewriteRule ^forgot$ forgot.php
    RewriteRule ^resetpassword/(.*) resetpassword.php?code=$1
    RewriteRule ^resendconfirmation/(.*) resendconfirmation.php?userid=$1
    RewriteRule ^termsofuse$ termsofuse.php
    RewriteRule ^privacypolicy$ privacypolicy.php
    RewriteRule ^aboutus$ aboutus.php
    RewriteRule ^advertising$ advertising.php
    RewriteRule ^contactus$ contactus.php
    RewriteRule ^([^/.]+)/([^/.]*)?$ view.php?title=$1&id=$2&%{QUERY_STRING}
    RewriteRule ^([^/.]+)(\/)?$ categories.php?key=$1
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    RewriteMap lc int:tolower
    RewriteCond %{REQUEST_URI} [A-Z]
    RewriteRule (.*) ${lc:$1} [R=301,L]

    </IfModule>

    <IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed,
    # but better safe than sorry.
    SecFilterScanPOST Off
    </IfModule>



    thanks,

    Scott
     
    scottwood1986, Apr 1, 2010 IP