Help:Redirect: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
#REDIRECT [[target]] | #REDIRECT [[target]] | ||
</pre> | </pre> | ||
...where "target" is the name of the target page. It is also possible to add a | ...where "target" is the name of the target page. It is also possible to add a section header to make a redirect to a specific section of the target page in the following manner: | ||
<pre> | <pre> | ||
#REDIRECT [[target#section header]] | #REDIRECT [[target#section header]] | ||
Line 17: | Line 17: | ||
==Syntax== | ==Syntax== | ||
A page will be treated as a redirect page if its | A page will be treated as a redirect page if its wikitext begins with <code>#REDIRECT</code> followed by a valid wikilink or interwikilink. A space is usually left before the link. (Note that some alternative capitalizations of "REDIRECT" are possible.) | ||
Note that a redirect will work as intended (i.e. take the reader directly to the target page) only if the link is to an existing normal page (not a | Note that a redirect will work as intended (i.e. take the reader directly to the target page) only if the link is to an existing normal page (not a special page) on the same project (English Wikipedia). In other cases soft redirects are often used – see [[#Soft redirects|below]]. | ||
Examples: | Examples: | ||
Line 30: | Line 30: | ||
Note that the redirect link must be explicit – it cannot contain [[Help:Magic words|magic words]], templates, etc. | Note that the redirect link must be explicit – it cannot contain [[Help:Magic words|magic words]], templates, etc. | ||
When redirecting to a [[Help:category|category]] page, prefix the target pagename with a colon to prevent the redirect from showing up in the category. (Redirects from one category page to another should use soft redirects – see [[#Soft redirects|below]].) Redirects to [[Help:images|image]] pages also require the colon. | When redirecting to a [[Help:category|category]] page, prefix the target pagename with a colon to prevent the redirect from showing up in the category. Example: <code><nowiki>#REDIRECT [[:Category:Help]]</nowiki></code> (Redirects from one category page to another should use soft redirects – see [[#Soft redirects|below]].) Redirects to [[Help:images|image]] pages also require the colon. | ||
Revision as of 16:14, 1 February 2015
Help:Redirect | |
|