nginx:redirects
This is an old revision of the document!
Table of Contents
nginx - Redirects
Temporary Redirect
Temporary redirects (response status code 302 Found) are useful if a URL temporarily needs to be served from a different location. For example, if you are performing site maintenance, you may wish to use a temporary redirect of from your domain to an explanation page to inform your visitors that you will be back shortly.
Permanent Redirect
rewrite ^/oldlocation$ http://www.newdomain.com/newlocation permanent;
Permanent redirects (response status code 301 Moved Permanently), on the other hand, inform the browser that it should forget the old address completely and not attempt to access it anymore. These are useful when your content has been permanently moved to a new location, like when you change domain names.
nginx/redirects.1487764571.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)