Help:Redirect: Difference between revisions

From BoyWiki
No edit summary
No edit summary
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. 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.
When redirecting to a 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:16, 1 February 2015

Help:Redirect

A redirect is a page created so that navigation to a given title will take the reader directly to a different page. A redirect is created using the syntax:

#REDIRECT [[target]]

...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:

#REDIRECT [[target#section header]]

The pound/number sign (#) is also used to link to page anchors.

Syntax

A page will be treated as a redirect page if its wikitext begins with #REDIRECT 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 special page) on the same project (English Wikipedia). In other cases soft redirects are often used – see below.

Examples:

  • #REDIRECT [[France]] (redirects to the France article)
  • #REDIRECT [[France#History]] (redirects to the "History" section of the France article)
  • #REDIRECT [[fr:France]] (appears as a redirect to the France article on French BoyWiki, but will not work as a true redirect)

Any text appearing after the redirect link will be ignored in the display, but may be used to add categories, interwiki links, comments, etc.

Note that the redirect link must be explicit – it cannot contain magic words, templates, etc.

When redirecting to a category page, prefix the target pagename with a colon to prevent the redirect from showing up in the category. Example: #REDIRECT [[:Category:Help]] (Redirects from one category page to another should use soft redirects – see below.) Redirects to image pages also require the colon.


See also