Differences between revisions 6 and 7
Revision 6 as of 2007-07-09 10:59:53
Size: 1173
Editor: noodl
Comment: Link fix
Revision 7 as of 2009-09-20 22:13:28
Size: 1174
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
 1. If you have ensured that mod_rewrite is loaded, and that !RewriteRule is enabled for htaccess files, it could be that your rules are [:RewriteLooping:looping].  1. If you have ensured that mod_rewrite is loaded, and that !RewriteRule is enabled for htaccess files, it could be that your rules are [[RewriteLooping|looping]].

When attempting to use mod_rewrite in a .htaccess file fails, try these steps.

  1. Stop! Don't use htaccess files for mod_rewrite unless you have no other choice. Doing so is slow and confusing.
  2. Put a nonsense line (such as Wooga) in your htaccess file and try the request again. If you don't see a 500 Internal Server Error message, your htaccess file is being ignored altogether. The solution is to set both AllowOverride FileInfo and Options FollowSymlinks in httpd.conf for the directory in question. However, if you are able to make that change, see step one.

  3. If you think your rules look ok but you still see a 500 Internal Server Error message, make sure mod_rewrite is loaded in the server.
  4. If you have ensured that mod_rewrite is loaded, and that RewriteRule is enabled for htaccess files, it could be that your rules are looping.

  5. If none of the above steps help, try a very simple rewrite to check if the module is enabled. For example:

RewriteEngine On
# Redirect all requests to example.com
RewriteRule ^ http://example.com/

RewriteHtaccessIgnored (last edited 2009-09-20 22:13:28 by localhost)