Apache

ID #292

My mod_rewrite rules make my website stop loading.

Applies to: Grid System

Some downloadable PHP software packages use mod_rewrite to do dynamic URL rewriting. If the rewrite directives (contained in .htaccess files) seem to make your website hang indefinitely, they are probably causing an infinite loop. You can fix this by adding a "RewriteBase" directive to the .htaccess file that has your other rewrite directives.

If your package is installed at the DocumentRoot (http://yoursite.com/) then the solution may be to add the following:

RewriteBase /


If your package is installed in a subdirectory of the DocumentRoot (http://yoursite.com/something/), then try making that subdirectory the RewriteBase like so:

RewriteBase /something

Last update: 2010-10-04 14:45
Author: FAQ Admin
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ

Comment of Anonymous:
Drupal also works fine with this setting.
Added at: 2005-04-16 12:20

Comment of Anonymous:
This also applies to Joomla, despite only returning a search result for Mambo.
Added at: 2006-05-31 10:03

Comment of Anonymous:
Textpattern needs this fix in addition to their own recommended .htaccess file.
Added at: 2006-07-29 20:03

Comment of Anonymous:
To use textpattern with Clean URLs, I not only had to add the RewriteBase directive, I also had to make a change in the default textpattern .htaccess file to use a fully qualified path to index.php in the last RewriteRule.

I changed:

RewriteRule ^(.*) index.php
to:
RewriteRule ^(.*) /index.php


Added at: 2006-11-08 18:17