User Tools

Site Tools


nginx:redirects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nginx:redirects [2017/02/22 11:57] peternginx:redirects [2019/12/01 10:41] (current) – removed peter
Line 1: Line 1:
-====== nginx - Redirects ====== 
- 
-===== Temporary Redirect ===== 
- 
-<file bash> 
-rewrite ^/oldlocation$ http://www.newdomain.com/newlocation redirect; 
-</file> 
- 
-<WRAP info> 
-**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. 
-</WRAP> 
- 
-===== Permanent Redirect ===== 
- 
-<file bash> 
-rewrite ^/oldlocation$ http://www.newdomain.com/newlocation permanent; 
-</file> 
- 
-<WRAP info> 
-**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. 
-</WRAP> 
  
nginx/redirects.1487764628.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki