• Login
  • Become a blogger
  • Fix 500 Internal server Error on .htaccess

    Posted by thinkdj on January 8th, 2008
    10 Comments | 11,928 pageviews

    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>

    10 Responses »

    1. Have the same problem, I’ll try..

    2. bali car rental says:

      Have the smame problem, I’ll try..

    3. I was looking for the solution and at last I got it here. thanks guys.

    4. Ali says:

      Thanks, it work 100%

    5. Ali says:

      Thanls, i work 100%

    6. eGodaddy says:

      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?

    7. HydroMan says:

      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

    8. benny says:

      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….

    9. Stefan says:

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

    10. Aamir Kilwani says:

      Great its really worked

    Trackbacks/Pingbacks

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    More from "Developers"

    Find what you are looking for

    Recently added

    Categories

    Blogulate

    Keeping you updated of the latest fads and developments of the industry via amalgamated web content.

    Join us

    Post articles on blogulate and monetize them. Learn more »

    Stay updated

    Subscribe now and stay aware of the latest trends and happenings on the www. Get notified via email when we update.

    Enter your email address:

    Blogulate is based on Magnus premium theme by WizeDesigns
    © 2009 Blogulate. Some rights reserved.