Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got some RedirectMatch statements to redirect old urls to the new documents, but for some reason they're working properly, except that it's appending the initial request url as a query string. Eg. Requesting

http://www.domain.com/filename.html

redirects to

http://www.domain.com/new_filename.html?/filename.html

The corresponding rule would be:

RedirectMatch 301 ^/filename.html$ http://www.domain.com/new_filename.html

Any ideas why this is happening?

share|improve this question
add comment

1 Answer

Your example doesn't require RedirectMatch; use a simple Redirect:

Redirect permanent /filename.html http://www.domain.com/new_filename.mhtml

Remember that Redirect works on URLs, not paths.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.