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

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

1 Answer 1

You can use following redirect:

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

Your Answer


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.