With a little side of applesauce...

Tuesday, January 30, 2007

RedirectMatch with a trailing slash

This always gets me:

RedirectMatch ^/catalogs/$ http://my.web.com/catalog

never matches because Apache appends the DirectoryIndex which is found in the directory, (ie index.html). Therefore, we need to include the DirectoryIndex to the regular expression:

RedirectMatch ^/catalogs/index.html$ http://my.web.com/catalog

No comments: