Login Login

Difference between revisions of "Choosing redirect types"

Your guide to pathway services

Jump to: navigation, search
m (Protected "Choosing redirect types" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) [cascading])
 
Line 1: Line 1:
=== '''Redirect type:'''<br/> ===
+
= Redirect type<br/> =
  
 
Allows you to specify if you want to enable or disable redirect.
 
Allows you to specify if you want to enable or disable redirect.
Line 5: Line 5:
  
  
=== '''No flag:'''<br/> ===
+
= No flag<br/> =
  
 
&nbsp;If you select this option flags will not be used.
 
&nbsp;If you select this option flags will not be used.
Line 11: Line 11:
  
  
=== '''R (Apache only):'''<br/> ===
+
= R (Apache only)<br/> =
  
 
Use of the [R] flag causes a HTTP redirect to be issued to the browser. If a fully-qualified URL is specified (including ''[http://servername/ http://servername/]'' ) then a redirect will be issued to that location. Otherwise, the current server name will be used to generate the URL sent with the redirect.
 
Use of the [R] flag causes a HTTP redirect to be issued to the browser. If a fully-qualified URL is specified (including ''[http://servername/ http://servername/]'' ) then a redirect will be issued to that location. Otherwise, the current server name will be used to generate the URL sent with the redirect.
Line 17: Line 17:
  
  
=== '''L (Apache only):'''<br/> ===
+
= L (Apache only)<br/> =
  
 
The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts this means that if the rule matches, no further rules will be processed.
 
The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts this means that if the rule matches, no further rules will be processed.
Line 23: Line 23:
  
  
=== '''R,L (Apache only): &nbsp;'''<br/> ===
+
= R,L (Apache only)&nbsp;<br/> =
  
 
In most cases [R] and [L] will be used together. On its own the [R] flag prepends [http://thishost http://thishost][:thisport] to the URL, but then passes this on to the next rule in the rule set. This can often result in 'Invalid URI in request' warnings.
 
In most cases [R] and [L] will be used together. On its own the [R] flag prepends [http://thishost http://thishost][:thisport] to the URL, but then passes this on to the next rule in the rule set. This can often result in 'Invalid URI in request' warnings.
Line 29: Line 29:
  
  
=== '''last (nginx only):'''<br/> ===
+
= last (nginx only)<br/> =
  
 
Completes processing of rewrite directives, and then &nbsp;searches for the corresponding URL and location.
 
Completes processing of rewrite directives, and then &nbsp;searches for the corresponding URL and location.
  
=== <br/> ===
 
  
=== '''break (nginx only):''' ===
+
 
 +
= break (nginx only)<br/> =
  
 
Completes processing of rewrite directives,&nbsp; and&nbsp; then breaks the location lookup cycle by not doing any location lookup or internal jump at all.
 
Completes processing of rewrite directives,&nbsp; and&nbsp; then breaks the location lookup cycle by not doing any location lookup or internal jump at all.
Line 41: Line 41:
  
  
=== '''redirect (nginx only):'''<br/> ===
+
= redirect (nginx only)<br/> =
  
 
Returns temporary redirect with code 302. It is used if the substituting line begins with [http:// http://].
 
Returns temporary redirect with code 302. It is used if the substituting line begins with [http:// http://].
Line 47: Line 47:
  
  
=== '''permanent (nginx only):'''<br/> ===
+
= permanent (nginx only)<br/> =
  
 
Returns permanent redirect with code 301.
 
Returns permanent redirect with code 301.
Line 53: Line 53:
  
  
=== '''proxy (nginx only):'''<br/> ===
+
= proxy (nginx only)<br/> =
  
 
This option (which does not refer to an official nginx rewrite flag) allows proxy requests to display contents from somewhere else without having to change the web site URL.
 
This option (which does not refer to an official nginx rewrite flag) allows proxy requests to display contents from somewhere else without having to change the web site URL.
  
=== <br/> ===
 
  
=== '''Redirect Path: '''<br/> ===
+
 
 +
= Redirect Path<br/> =
  
 
The redirect path is the route taken to reach a destination.
 
The redirect path is the route taken to reach a destination.
Line 65: Line 65:
  
  
=== '''SEO redirect: '''<br/> ===
+
= SEO redirect<br/> =
  
 
Select this option for search engine optimization for your website; this will allow you to configure redirects and prevent search engines from thinking you have multiple websites.
 
Select this option for search engine optimization for your website; this will allow you to configure redirects and prevent search engines from thinking you have multiple websites.
Line 75: Line 75:
  
  
{| border="1" cellpadding="0" cellspacing="0"
+
{| cellspacing="0" cellpadding="0" border="1"
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
<br/>'''No redirect: &nbsp;'''&nbsp;
+
'''No redirect: &nbsp;'''&nbsp;
  
 
| style="width:372px" |  
 
| style="width:372px" |  
<br/>SEO redirect will not be performed.
+
SEO redirect will not be performed.
 
+
&nbsp;
+
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
'''domain.tld => [http://www.domain.tld www.domain.tld]:'''
 
'''domain.tld => [http://www.domain.tld www.domain.tld]:'''
  
Line 93: Line 91:
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
'''www.domain.tld => domain.tld:'''
 
'''www.domain.tld => domain.tld:'''
  
 
| style="width:372px" |  
 
| style="width:372px" |  
 
Redirect requests for ''www.example.com'' to ''example.com''.
 
Redirect requests for ''www.example.com'' to ''example.com''.
 
&nbsp;
 
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
'''.domain.tld => domain.tld:'''
 
'''.domain.tld => domain.tld:'''
  
 
| style="width:372px" |  
 
| style="width:372px" |  
 
Redirect all subdomains of ''example.com'' (including ''www.example.com'') to ''example.com''.
 
Redirect all subdomains of ''example.com'' (including ''www.example.com'') to ''example.com''.
 
&nbsp;
 
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''.domain.tld => [http://www.domain.tld www.domain.tld]:'''
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''.domain.tld => [http://www.domain.tld www.domain.tld]:'''
  
 
| style="width:372px" |  
 
| style="width:372px" |  
 
Redirect all subdomains (including ''example.com'' itself) to ''www.example.com''.
 
Redirect all subdomains (including ''example.com'' itself) to ''www.example.com''.
 
&nbsp;
 
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
'''=> domain.tld:'''
 
'''=> domain.tld:'''
  
 
| style="width:372px" |  
 
| style="width:372px" |  
 
Redirect everything including subdomains and alias domains that are not from ''example.com'' to ''example.com''.
 
Redirect everything including subdomains and alias domains that are not from ''example.com'' to ''example.com''.
 
&nbsp;
 
  
 
|-
 
|-
| style="width:252px" |  
+
! style="width: 252px" scope="row" |  
 
'''=> www.domain.tld:'''
 
'''=> www.domain.tld:'''
  
 
| style="width:372px" |  
 
| style="width:372px" |  
 
Redirect everything including subdomains and alias domains that are not from ''www.example.com'' to [http://www.example.com <i>www.example.com</i>]
 
Redirect everything including subdomains and alias domains that are not from ''www.example.com'' to [http://www.example.com <i>www.example.com</i>]
 
&nbsp;
 
  
 
|}
 
|}

Latest revision as of 12:40, 4 November 2016

Contents

Redirect type

Allows you to specify if you want to enable or disable redirect.


No flag

 If you select this option flags will not be used.


R (Apache only)

Use of the [R] flag causes a HTTP redirect to be issued to the browser. If a fully-qualified URL is specified (including http://servername/ ) then a redirect will be issued to that location. Otherwise, the current server name will be used to generate the URL sent with the redirect.


L (Apache only)

The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts this means that if the rule matches, no further rules will be processed.


R,L (Apache only) 

In most cases [R] and [L] will be used together. On its own the [R] flag prepends http://thishost[:thisport] to the URL, but then passes this on to the next rule in the rule set. This can often result in 'Invalid URI in request' warnings.


last (nginx only)

Completes processing of rewrite directives, and then  searches for the corresponding URL and location.


break (nginx only)

Completes processing of rewrite directives,  and  then breaks the location lookup cycle by not doing any location lookup or internal jump at all.


redirect (nginx only)

Returns temporary redirect with code 302. It is used if the substituting line begins with [http:// http://].


permanent (nginx only)

Returns permanent redirect with code 301.


proxy (nginx only)

This option (which does not refer to an official nginx rewrite flag) allows proxy requests to display contents from somewhere else without having to change the web site URL.


Redirect Path

The redirect path is the route taken to reach a destination.


SEO redirect

Select this option for search engine optimization for your website; this will allow you to configure redirects and prevent search engines from thinking you have multiple websites.


For SEO redirect you can choose from the following options:


No redirect:   

SEO redirect will not be performed.

domain.tld => www.domain.tld:

Redirect requests for example.com to www.example.com.

www.domain.tld => domain.tld:

Redirect requests for www.example.com to example.com.

.domain.tld => domain.tld:

Redirect all subdomains of example.com (including www.example.com) to example.com.

                                                                             .domain.tld => www.domain.tld:

Redirect all subdomains (including example.com itself) to www.example.com.

=> domain.tld:

Redirect everything including subdomains and alias domains that are not from example.com to example.com.

=> www.domain.tld:

Redirect everything including subdomains and alias domains that are not from www.example.com to www.example.com





References:

• Apache: http://httpd.apache.org/docs/2.2/rewrite/flags.html

• nginx: http://wiki.nginx.org/NginxHttpRewriteModule#rewrite