Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Preferred way to do redirects (rewrite or return) (1 reply)

$
0
0
What is the preferred way to do redirects? I know of two solutions:

rewrite "^/help/?$" https://support.mydomain.com permanent;

or

location ^/help/?$ {
return 301 https://support.mydomain.com;
}

I think I like using a location block and a return statement. Which is faster though and the standard?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>