Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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.