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

Say I want all requests to example.com to redirect to abc.com.

How can I make everything redirect to the root of abc.com and not include any paths or parameters included in example.com?

For example

example.com/index.py?var=1 should go to abc.com

I tried this in my .htaccess

RedirectPermanent / http://www.abc.com

But it does this:

example.com/index.py?var=1 goes to abc.com/index.py?var=1
share|improve this question

You can use following redirect:

RedirectMatch permanent . http://www.abc.com
share|improve this answer

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.