Help:Redirect: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Pengo (talk | contribs)
m previous edit by pengo
Pengo (talk | contribs)
No edit summary
Line 5: Line 5:
:''See also: [[w:Wikipedia:Redirect|Wikipedia:Redirect]]''
:''See also: [[w:Wikipedia:Redirect|Wikipedia:Redirect]]''


A redirect is a page with no content other than an entry in the form:
A redirect is a page with no content other than:


<nowiki>#REDIRECT [[</nowiki>''pagename''<nowiki>]]</nowiki>
<nowiki>#REDIRECT [[</nowiki>''pagename''<nowiki>]]</nowiki>


Where ''pagename'' is the article or page to redirect to.
Where ''pagename'' is the article or page to redirect to. For example, on Wikipedia, the page "Ancient forest" has only the text:

<nowiki>#REDIRECT [[Old growth forest]]</nowiki>

See [[w:Ancient forest|Ancient forest]] for how this appears when a reader goes to the "Ancient forest" article. The "Old growth forest" page should appear from this link. A small notice of the redirect is also displayed (under the top title) to indicate you arrived here indirectly. If you click the link in the notice "(Redirected from [http://en.wikipedia.org/w/index.php?title=Ancient_forest&redirect=no Ancient forest])" you can see (and edit) the redirection page itself.


===How it appears to the user===
===How it appears to the user===
Line 33: Line 37:
==Purposes of a redirect==
==Purposes of a redirect==


* Alternate capitalization and hyphenation
*Finding a page
* Alternate spelling
*Conveniently going to a page
* Common misspellings
* Shortcuts for conveniently going to a page
* To keep external links to a page active after it has been moved

=== Special purposes ===
*Conveniently linking indirectly to a page, without the need for a [[Help:Piped link|Piped link]]. For this purpose, making the stem (the common first part) of a collection of strongly related terms a redirect reduces the need for having many redirects. E.g. [[categor]] can be used for category, categories, categorical. Note that having the other redirects anyway is even better; also a piped link is in some respects even better than relying on a redirect, see [[Help:Piped link#Using a redirect as an alternative|Comparison with piped link]].
*Conveniently linking indirectly to a page, without the need for a [[Help:Piped link|Piped link]]. For this purpose, making the stem (the common first part) of a collection of strongly related terms a redirect reduces the need for having many redirects. E.g. [[categor]] can be used for category, categories, categorical. Note that having the other redirects anyway is even better; also a piped link is in some respects even better than relying on a redirect, see [[Help:Piped link#Using a redirect as an alternative|Comparison with piped link]].
*Allowing a link title independent of the final link target; one creates a page whose name is the desired link title, and which redirects to the desired target page. See e.g. [[w:Template:Ft]], containing <nowiki>[[30.48 cm|ft]]</nowiki>, with the page [[w:30.48 cm]] redirecting to [[w:Foot (unit of length)]]. The link title "30.48 cm" informs in the hover box about the unit "ft" even without following the link to the article about this unit. See also [[Help:Editing#Hover_box|hover box]] for another technique with a similar result.
*Allowing a link title independent of the final link target; one creates a page whose name is the desired link title, and which redirects to the desired target page. See e.g. [[w:Template:Ft]], containing <nowiki>[[30.48 cm|ft]]</nowiki>, with the page [[w:30.48 cm]] redirecting to [[w:Foot (unit of length)]]. The link title "30.48 cm" informs in the hover box about the unit "ft" even without following the link to the article about this unit. See also [[Help:Editing#Hover_box|hover box]] for another technique with a similar result.

Due to redirects, after renamings and merges, old URLs in links, bookmarks, [[w:Search engine|search engine]]s, etc., still lead to the appropriate page.


== The move tool ==
== The move tool ==

Revision as of 01:52, 6 February 2007

See this page for a WikiProject Redirect guide on writing good redirects.
See also: Wikipedia:Redirect

A redirect is a page with no content other than:

#REDIRECT [[pagename]]

Where pagename is the article or page to redirect to. For example, on Wikipedia, the page "Ancient forest" has only the text:

#REDIRECT [[Old growth forest]]

See Ancient forest for how this appears when a reader goes to the "Ancient forest" article. The "Old growth forest" page should appear from this link. A small notice of the redirect is also displayed (under the top title) to indicate you arrived here indirectly. If you click the link in the notice "(Redirected from Ancient forest)" you can see (and edit) the redirection page itself.

How it appears to the user

If the link is to an existing page in the same project, going to the redirect (by means of a link, the URL, or the Go button) results in the new page, just like following the link, except that the browser shows the original URL, and the new page shows a redirection message below the title. (To get the canonical URL in your browser's address bar, click the article tab.)

For example, if somebody goes to: Help:Redirection, then they will end up at this page instead, and the top of the page will look like:

Help:Redirect

From Meta

(Redirected from Help:Redirection)

(etc)

If the link is to a non-existing page in the same project, or to a page in another project, one simply arrives at the redirect page.

As a simple way to avoid problems with infinite recursion, if the redirect target is another redirect page, the second redirect is not applied.

When a page called for inclusion is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. Again, a double redirect does not work.

Purposes of a redirect

  • Alternate capitalization and hyphenation
  • Alternate spelling
  • Common misspellings
  • Shortcuts for conveniently going to a page
  • To keep external links to a page active after it has been moved

Special purposes

  • Conveniently linking indirectly to a page, without the need for a Piped link. For this purpose, making the stem (the common first part) of a collection of strongly related terms a redirect reduces the need for having many redirects. E.g. categor can be used for category, categories, categorical. Note that having the other redirects anyway is even better; also a piped link is in some respects even better than relying on a redirect, see Comparison with piped link.
  • Allowing a link title independent of the final link target; one creates a page whose name is the desired link title, and which redirects to the desired target page. See e.g. w:Template:Ft, containing [[30.48 cm|ft]], with the page w:30.48 cm redirecting to w:Foot (unit of length). The link title "30.48 cm" informs in the hover box about the unit "ft" even without following the link to the article about this unit. See also hover box for another technique with a similar result.

The move tool

When a page is renamed/moved with the Renaming (moving) a page function, a redirect is automatically created from the old to the new name, and also one for the corresponding talk page.

If the new page name is occupied by a redirect with only one edit in its history, it is replaced by the page being moved. If the redirect has more than one history entry, then it must either be deleted by an administrator or moved to another name. This move will leave behind a new redirect with no edit history, which can then be replaced by the desired page move. It might be desirable to delete the moved redirect.

Creating a redirect

If you're creating a new redirect, start a new page, write #REDIRECT [[pagename]] (or #redirect [[pagename]]) at the top of the page, where pagename is the name of the target page. Here is an example. If you're replacing an existing page with a redirect, for example after merging a duplicate page, go to th