Standard Rule
Overview
This type of rule will present you with three input fields and a checkbox, namely:
- Description - From - To - Type
Description
This field is meant to provide a clear description of the rule, so it's clear for other people what it does and why it was created. This will also help you to find it later using the search.
From
Here you can enter the URL that must be rewritten. The URL must either start with a '/' or be fully qualified, i.e. starting with http(s):// The URL may contain 'wildcards' * will match any single element, ** will match all elements. For example:
URL | Explanation |
---|---|
/abc | This will match the URL /abc |
/abc/* | This will match the URL /abc/def, but not /abc/def/ghi |
/abc/** | This will match any URL starting with /abc/ |
http://www.example.com/abc/**.html | This will match any URL starting with /abc/, and ending with .html, but only if the requested domain is www.example.com |
To
This field takes the URL where the above URL should be rewritten to. Any occurrence of a wildcard (* or **) in the from field can be referenced here as $N.
From field | To field | Explanation |
---|---|---|
/abc | /def | This will rewrite the URL /abc to /def |
/abc/*.html | http://www.example.com/def/$1.html | This will rewrite /abc/somedocument.html to http://www.example.com/def/somedocument.html |
Rule Type
What type of redirect should take place.
Rule Type | HTTP status code | Explanation |
---|---|---|
temporary-redirect | 302 | This will tell browsers (and search engines) to keep requesting the original URL as this redirect is only temporary |
permanent-redirect | 301 | This will tell browser (and search engines) that the requested URL has permanently moved, so they can update their caches and from now on directly request the new URL. |