Jump to content

Help:Redirect: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Reverted 1 edit by Meswara (talk): Rv test edit. (TW)
Replaced content with 'SANJAY MAURYA-VATANASI,INDIA'
Line 1: Line 1:
SANJAY MAURYA-VATANASI,INDIA
{{shortcut|H:R}}
{{about|directing a search term to a Wikipedia article|clarifying redirected search terms at the article itself|Template:Redirect}}
{{for|guidance on the use of redirects|Wikipedia: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:

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

where ''Target'' is the name of the target page. It is also possible to add a [[WP:section|section]] anchor to make a redirect to a specific section of the target page.

==Syntax==
A page will be treated as a redirect page if its [[WP:wikitext|wikitext]] begins with <tt>#REDIRECT</tt> followed by a valid [[Help:Link|wikilink]] or [[Help:Interwiki|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 [[Help:special page|special page]]) on the same project (English Wikipedia). In other cases soft redirects are often used – see [[#Soft redirects|below]].

Examples:
*<tt><nowiki>#REDIRECT [[France]]</nowiki></tt> (redirects to the [[France]] article)
*<tt><nowiki>#REDIRECT [[France#History]]</nowiki></tt> (redirects to the "History" section of the [[France]] article)
*<tt><nowiki>#REDIRECT [[fr:France]]</nowiki></tt> (appears as a redirect to the [[France]] article on French Wikipedia, 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 [[Help:Magic word|magic words]], [[WP:template|template]]s, 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:image|image]] pages also require the colon.

==How it appears to the user==
If the redirect target is an existing page on English Wikipedia, then if a reader navigates to the redirect page – by means of a [[Help:Link|wikilink]], the [[Help:Go button|Go button]] or a [[Help:URL|URL]] – the reader will be taken directly to the target page. However, the browser still shows the URL of the redirect page, and the target page shows a small notice below the top title to indicate that you arrived by means of a redirect. For example, if you click [[Transportation]], you will be redirected to the [[Transport]] article, and the top of the page will look like:

<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">
{{fake heading|Transport}}
{{fake heading|sub=3|From Wikipedia, the free encyclopedia}}
<div>(Redirected from <span class="plainlinks">[{{fullurl:Transportation|redirect=no}} Transportation]</span>)</div>
</blockquote>

To get the canonical URL of the target page in your browser's address bar, click the article tab (or equivalent). To go to the redirect page itself (to edit it, view its history, etc.), click the link in the "(Redirected from...)" notice.

If the redirect target is a non-existing page ([[WP:redlink|redlink]]), or a [[Help:special page|special page]], or a page in another project, then the redirect is not followed, and the reader sees the display of the redirect page (as illustrated below). If the target is a non-existent section of an existing page, then the redirect will take the reader to the top of the target page.

Chains of redirects are not followed. If title ''A'' redirects to ''B'', and ''B'' is itself a redirect page, then a reader navigating to ''A'' will see the display of the redirect page ''B'' (as illustrated). See [[WP:Double redirects|Double redirects]]. ([[Help:Bot|Bot]]s fix such chains so that each redirect points directly to the final target page.)

A redirect page viewed directly, either in the situations described above, or when the [[Help:URL|URL]] used to access the page contains the query parameter <code>&redirect=no</code>, looks like this:

<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">
{{fake heading|Transportation}}
{{fake heading|sub=3|From Wikipedia, the free encyclopedia}}
<div>Redirect page</div>
[[Image:Redirectltr.png]] <span class="redirectText">[[Transport]]</span>
</blockquote>

(Click [http://en.wikipedia.org/w/index.php?title=Transportation&redirect=no here] to see the actual Transportation redirect page.)

Redirects to articles that begin with a lowercase title, for example the redirect from the page at [http://en.wikipedia.org/w/index.php?title=EBay.com&redirect=no Ebay.com] to the article at [[eBay]], will display the target page with a capitalized first letter, even though the article displays the title with a lowercase title. This is because the true title of the target page is actually capitalized — it just appears lowercase because of the use of the magic word [[Help:Magic words#Behavior_switches|DISPLAYTITLE]]. (Usually, the template <nowiki>{{</nowiki>[[Template:Lowercase title|Lowercase title]]<nowiki>}}</nowiki> is used to implement the DISPLAYTITLE magic word for lowercase titles.)

===Section redirects===
When the redirect target is a [[Help:section link|section link]], following a redirected link should lead to the section or other element identified by the link. Normally the redirected page includes the entire contents of the target page as if the section fragment wasn't specified, and uses [[JavaScript]] to jump to the section after the page is loaded. If JavaScript is disabled, this jump does not happen.

When a redirect page is viewed directly without following the target link, the link is shown as an ordinary section link, and works as usual without the use of Java script.

==Purposes of a redirect==
Redirects are usually created because readers may search for an article under different names (or editors may wish to link to it from different names). Examples are:
* alternative names for the same thing
* alternative spellings, capitalizations etc. (although it is not necessary to create redirects from different capitalizations just because readers may enter them in the search box - the Go button resolves this automatically)
* common misspellings
* subtopics which do not have their own article (in this case you may redirect to a section of the target page)
* [[WP:Shortcut|shortcuts]] to a page, used mainly in project space (such as [[WP:AFD]])
* redirects serving to keep links to a page active after it has been renamed (even if internal links are updated, this still applies for links from outside and [[Help:Edit summary#Internal and interwiki links in edit summaries|links in edit summaries]])

Note that it is not necessary to create redirects from every title from which an editor may conceivably wish to link to a given page – [[Help:Piped link|piped links]] can be used as an alternative.

For more details, see [[Wikipedia:Redirect]].

==Creating and editing redirects==
:''Unregistered users can request a redirect be created at the [[Wikipedia:Article wizard/Redirect|article wizard]].''

A redirect page can be created like any other page (see [[Help:Creating a new page|Creating a new page]]). Simply type in the wikitext <tt><nowiki>#REDIRECT [[</nowiki>xxx]]</tt>, replacing "xxx" with the title of the target page (optionally followed by a "#" sign and the section title).

Make sure that there is no text ''before'' the #REDIRECT keyword, or the redirect will not work. There is not usually any reason to place any text after the link either, although sometimes categories (or categorizing templates&mdash;see [[WP:Categorizing redirects|Categorizing redirects]]), interwiki links (see [[WP:Interlanguage links|Interlanguage links]]) or HTML comments (<code><nowiki><!-- comment --></nowiki></code>) are added.

Similarly, any existing page can be edited to turn it into a redirect.

To edit a page which is already a redirect (or to view its history, talk page, etc.), follow the redirect to the target page, then click on the link in the "(Redirected from ...)" notice at the top of the page. This will take you to the redirect page itself. (The [[Help:URL|URL]] for accessing a redirect page without following the redirect contains the query parameter ''redirect=no''.)

Another way to get to a redirect page is to go to the target page, and click "[[Help:What links here|What links here]]" (in the toolbox on the left of the page). This will show you all the back-links from that page, including redirects. Clicking on a redirect in this list will take you to the redirect page, not the target.

The [[Help:edit summary|edit summary]] box can be left blank; the summary will then be automatically generated stating that the page has been redirected to the given target. (This applies for: a new redirect page; an existing article page turned into a redirect page; and a change to the target of an existing redirect.) The generated summary is overridden if the editor supplies their own summary.

[[WP:Administrator|Administrator]]s can delete redirects in the same way as any other page. Deletion or other potentially controversial treatment of redirects can be proposed by any editor at [[WP:Redirects for discussion|Redirects for discussion]]. Please refer to Wikipedia's [[WP:deletion policy|deletion policy]] for details and instructions.

== Moving pages ==
When a page is [[Help:Moving a page|moved]] (renamed), a redirect is automatically created from the old to the new name, and also one for the corresponding talk page (if that was moved as well). [[WP:Administrator|Administrator]]s can choose to [[Wikipedia:Redirect#Suppressing redirects|suppress]] creation of the redirect.

If the new page name is occupied by a redirect that has only one edit in its history and targeted to the old page name, it is replaced by the page being moved. If the redirect has more than one history entry, or has a different target page, then the move must be made by an administrator.

==Transclusion==
When a page called for [[WP:transclusion|transclusion]] is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. Hence if [[Template:AFD]] is redirected to [[Template:Afd]], then <tt><nowiki>{{AFD|...}}</nowiki></tt> will have the same effect as <tt><nowiki>{{Afd|...}}</nowiki></tt> As usual, [[WP:double redirects|double redirects]] are not followed.

== Soft redirects ==
As an alternative to the normal "hard" redirects (which take the reader directly to the target page), it is possible to create [[Wikipedia:Soft redirect|"soft" redirects]], which leave the reader on the redirect page, giving them the option of clicking the link to the target page. This is usually done in the following situations:
*When the target is on another project ([[Wiktionary]], [[MetaWiki|Meta]], other language Wikipedias, etc.) or is a [[Help:special page|special page]]. (In these situations a hard redirect would behave as a soft one in any case.)
*For [[Help:Category#Moving and redirecting category pages|redirects between categories]]. (Hard redirects will work for category pages, but soft ones are preferred because of the software's inability to recategorize pages from redirected categories.)

Soft redirects are created using the templates {{tl|soft redirect}} and {{tl|category redirect}}.

==See also==
{{Wikipedia glossary}}
*[[Wikipedia:Visualizing redirects]], for how to make links to redirects stand out (based on the <code>mw-redirect</code> CSS class)
*[[:Category:Redirect templates]]
*[[Wikipedia:Template messages/Redirect pages]]
*[[meta:Help:Redirect|Redirect technical help at Meta-Wiki]]
*[[WP:HAT|Hatnote]] and [[Wikipedia:HATTEST#Redirect|examples]] for page hatnotes
{{Help navigation}}
[[Category:Wikipedia article title help|Redirect]]
[[Category:Wikipedia redirects| ]]
[[Category:Wikipedia features|Redirect]]
[[Category:Wikipedia page help|Redirect]]

[[gl:Wikipedia:Como redireccionar unha páxina]]

Revision as of 13:13, 22 December 2013

SANJAY MAURYA-VATANASI,INDIA