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 want to redirect any request from one domain to another but not request the page on the new domain or pass parameters. The closest I got was:

RedirectMatch permanent ^(.*)$ http://www.example.com

but this passes the parameters (e.g. ?param=one) which is messy.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

From the docs:

... when you want to erase an existing query string, end the substitution 
string with just a question mark. 

So, I guess this should work:

   RedirectMatch permanent ^(.*)$ http://www.example.com/?
share|improve this answer
    
Thanks, that's pretty much it - still shows the question mark though. –  Mark Robinson Apr 20 '12 at 17:45
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.