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.

What is the URL provided to a RedirectMatch in a Directory context? Does Apache remove the part of the URL up to the current directory?

For context, I am trying to write a RedirectMatch in a directory context, and I want to know if I can anchor the front of the regex without having to include the server name and path, e.g.:

RedirectMatch ^/foo/([a-z-]+)$ http://www.example.com/$1

This doesn't seem to work for me (neither does ^foo/...), but if I don't anchor the front, it does. I would like to be able to anchor the front of the regex...

Thanks!

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.