Forum Moderators: phranque
I'm having a problem with RedirectMatch handling 404s. I have a redirect match set up to redirect all requests to a directory and its subdirectories to another directory.
RedirectMatch /at/TechZone [domain.com...]
This works fine for redirecting a request to /at/TechZone/blah or another subdirectory that exists. The problem is that when I request a page in /at/TechZone (such as /at/TechZone/adfhakdf) that doesn't exist, I get a 403 error.
Any ideas?
Welcome to WebmasterWorld!
Please post the ErrorDocument directive that you have defined -- There's no way to tell what's going on if we don't know what that looks like, and where it is located in relation to the path that fails.
In situations like this, we need to know what the code looks like, and also where it is located. For example, if your error documents are located in a path that will match your RedirectMatch, then they too will be redirected, which is bad for many reasons. If this is the case, and it can't be changed, then look into using mod_rewrite instead of mod_alias to do your redirects -- mod_rewrite gives you the ability to do more complex conditional rewrites or redirects.
Jim