I discovered on my local system when first testing Drupal 7 that I was running into too many redirects when trying to access clean URLs.

I found this was due to the main rewrite rule in the way it references index.php. It references it relative to the requested path instead of the site root:

RewriteRule ^ index.php [L]

I resolved the problem by simply adding a preceding slash to it as follows:

RewriteRule ^ /index.php [L]

If the preceding slash is missing, then let's say you request the clean URL http://www.example.com/admin/config it would rewrite that URL to http://www.example.com/admin/config/index.php. That file doesn't exist, so apache runs it through the rewrite rule again, ad infinitum thus hitting the apache redirect limit.

Comments

teknocat’s picture

neRok’s picture

Version: 7.0 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Anybody’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

@teknocat I guess you forgot to comment out RewriteBase?

Closing this outdated after > 10 years :)