Forum Moderators: phranque
Redirect 301 /cff/StoreLocations.html http://www.example.com/info/store_locations.html
When I test this in a browser it doesn't work, I get a 404 page not found error). I've got a couple of other redirects which DO work - just the last one does not. Any thoughts on this would be appreciated.
DirectoryIndex index.html /mm5/merchant.mvc
Redirect 301 /Merchant2 http://www.example.com/
Redirect 301 /cff http://www.example.com/
Redirect 301 /Merchant2/merchant.mvc http://www.example.com/
[edited by: encyclo at 11:23 pm (utc) on Nov. 5, 2007]
[edit reason] switched to example.com [/edit]
What's the order of those redirects involving the /cff directory? It looks like there might be a conflict/sequence issue
[httpd.apache.org...]
First, all Redirects are processed before Aliases are processed, and therefore a request that matches a Redirect or RedirectMatch will never have Aliases applied. Second, the Aliases and Redirects are processed in the order they appear in the configuration files, with the first match taking precedence.For this reason, when two or more of these directives apply to the same sub-path, you must list the most specific path first in order for all the directives to have an effect.
RedirectMatch 301 ^/Merchant2/(.*) http://www.example.com/
That seems to work well for my needs. It takes care of the bigger issue of other subdirectories and files which I don't want to/can't name for redirection. Thanks all for you help! and I think the last post was right - something about the order seems to have been in conflict.