Sathish Manohar
Sathish Manohar

Reputation: 6119

How to use nginx to redirect one page request to a different page

I want to redirect http://example.com/balcony-covers/ to
http://example.com/balcony-screens/ permanently. How can I do this in nginx.

Upvotes: 0

Views: 52

Answers (1)

shgutman
shgutman

Reputation: 134

Use your nginx.conf file.

Put

location /balcony-covers/ {
    return 301 $scheme://$host/balcony-screens/;
}

in your server block

Upvotes: 2

Related Questions