Forum Moderators: phranque
During that time, I've run across a host of Common Rewrite Issues that many have overlooked. Here is just a small listing of those...
The above are just a few of the more common ones I've come across. It would be nice to build a definitive categorized list of the most Common Rewrite Issues that we would be faced with from both an Apache and Windows perspective. Us Windows folks have a few things working against us out of the box.
In reference to #5, using this example...
www.example.com/sub/
If I remove that trailing forward slash and request the URI again, the server should append the trailing forward slash (a 301).
What I've found in a Windows environment is that you need to account for this when rewriting URIs. If you don't, your going to end up with a mess on your hands as /sub and /sub/ will be returning 200s causing duplication. /sub and /sub/ are two distinct URIs.
Mostly this is caused by people implementing custom error pages without reading the Apache ErrorDocument directive documentation [httpd.apache.org] thoroughly. In that documentation, it clearly states that if a full URL is given for the ErrorDocument, then a redirect will be invoked.
Just for clarity, here are two examples, incorrect and correct:
Incorrect (returns 302-Found redirect)
ErrorDocument 404 http://example.com/error404.shtml
ErrorDocument 404 /error404.php
Jim