Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 need to redirect only http://shop.test.com to http://www.test.com/fedex-orders/

Just homepage. Nothing else. ie http://shop.test.com/?page=blog should NOT redirect.

share|improve this question
up vote 1 down vote accepted

This should be what you want

RedirectMatch permanent ^/$ http://www.test.com/fedex-orders/
share|improve this answer
    
getting error on configtest – Harikrishnan Mar 25 '13 at 6:35
    
That's because this is an Apache configuration directive. – Michael Hampton Mar 25 '13 at 11:40
    
This ISN'T the correct answer. The question is about nginx, not apache. – Denys Vitali Feb 17 at 12:03
location = / {
    return 301 http://www.test.com/fedex-orders/;
}
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.