Login Login

Choosing redirect types

Your guide to pathway services

Jump to: navigation, search

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