Redirect only home page

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.


Solution 1:

location = / {
    return 301 http://www.test.com/fedex-orders/;
}

The use of = in location= / specifies that the URL must match / exactly, with nothing else preceding or following it.