Fix 500 Internal server Error on .htaccess

500 Internal Server Error on Localhost for Web.Developer Server Suite was pissing me off for a long time. The Apache error logs shows “RewriteEngine not allowed here”. Deleting .htaccess would fix the problem, but here is the fix. It’s a problem with mod_rewrite module and Apache’s AllowOverride configuration. Here’s how to fix it :

Firstly, make sure LoadModule rewrite_module modules/mod_rewrite.so is enabled in httpd.conf (Remove # before the line to enable)

Then, edit httpd.conf .. Find out the foll lines and mod -

<Directory “/www/vhosts/localhost”> #replace this with your dir name
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All #Added
</Directory>

<Directory />
Options FollowSymLinks
# AllowOverride Limit #Old Value
AllowOverride All #Added
Order deny,allow
Deny from all
Satisfy all
</Directory>



Search the Web with Google

5 Responses to “Fix 500 Internal server Error on .htaccess”


  1. 1 Aamir Kilwani

    Great its really worked

    1
  2. 2 Stefan

    Nice, i try it, and it work perfect. Thanks thinkdj

    2
  3. 3 benny

    I’m configure with Apache/2.0.63
    From the default loadModule rewrite_module modules/mod_rewrite.so is disabled by httpd.conf
    If you need to using “.htaccess” file, make notice the mod_rewrite.so is enabled.
    Thank’s a lot guyzzz….

    3
  4. 4 HydroMan

    Thanks for the tip, I used the following method instead of editing the httpd.conf file.

    As an alternative to keep the code all tidy you can write the changes to a seperate .conf file. As long as the setting for VHOST is enabled.

    If you have define(’VHOST’, ‘yes’); then you can edit the vhost.conf file usually found in the conf directory of the root. i.e. (depending on your directory structure): /var/www/vhosts/domain_name_here.com/conf/vhost.conf

    then add the following (amend directory structure for your install location)

    Options FollowSymlinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Satisfy all

    4
  5. 5 eGodaddy

    This got me closer, but I am still getting a 500 error, having just migrated to Vista x64. :(

    I tried using 127.0.0.1/site and a few other tricks I found on the Internet, but still fires the error when I rename the htaccess.txt file.

    Any idea, guys?

    5

Leave a Reply





Clicky