Line 1: |
Line 1: |
| {{for|guidance on the use of redirects|The TTSCpedia:Redirect}} A '''redirect''' is a page created so that navigation to a given title takes the reader directly to a different page. A redirect is created using the syntax:<pre> | | {{for|guidance on the use of redirects|The TTSCpedia:Redirect}} A '''redirect''' is a page created so that navigation to a given title takes the reader directly to a different page. A redirect is created using the syntax:<pre> |
| #REDIRECT [[Target]] | | #REDIRECT [[Target]] |
− | </pre>...where "target" is the name of the target page. It is also possible to add a [[WP:section|section]] header to make a redirect to a specific section of the target page in the following manner:<pre> | + | </pre>...where "target" is the name of the target page. It is also possible to add a [[TP:section|section]] header to make a redirect to a specific section of the target page in the following manner:<pre> |
| #REDIRECT [[Target#Section header]] | | #REDIRECT [[Target#Section header]] |
− | </pre>The pound/number/hash sign (#) is also used to link to [[WP:anchor|page anchors]]. | + | </pre>The pound/number/hash sign (#) is also used to link to [[TP:anchor|page anchors]]. |
| | | |
| == Syntax == | | == Syntax == |
Line 23: |
Line 23: |
| | | |
| == How it appears to the user == | | == How it appears to the user == |
− | If the redirect target is an existing page on English Wikipedia and a reader navigates to the redirect page – by [[Help:Link|wikilink]], the search box, or a [[Help:URL|URL]] – the reader is taken directly to the target page. A small notice below the top title indicates that the user arrived via a redirect. For example, if you click [[Transportation]], you are redirected to the [[Transport]] article, and the top of the page looks like:<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">{{fake heading|Transport}} <small>From Wikipedia, the free encyclopedia</small><div>(Redirected from <span class="plainlinks">[{{fullurl:Transportation|redirect=no}} Transportation]</span>)</div></blockquote>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 an existing page on English Wikipedia and a reader navigates to the redirect page – by wikilink, the search box, or a URL – the reader is taken directly to the target page. A small notice below the top title indicates that the user arrived via a redirect. For example, if you click [[Transportation]], you are redirected to the [[Transport]] article, and the top of the page looks like:<blockquote style="background-color: white; color: black; border:1px solid black; padding: 1em;">{{fake heading|Transport}} <div>(Redirected from <span class="plainlinks">[{{fullurl:Transportation|redirect=no}} Transportation]</span>)</div></blockquote>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. | | 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. |
Line 29: |
Line 29: |
| 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). ([[Help:Bot|Bots]] fix such chains so that each redirect points directly to the final 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). ([[Help:Bot|Bots]] 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 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}} <small>From Wikipedia, the free encyclopedia</small><div>Redirect page</div>[[File:Redirectltr.png|link=Special:FilePath/Redirectltr.png]] <span class="redirectText">[[Transport]]</span></blockquote>(See the actual {{no redirect|Transportation}} redirect page.) | + | A redirect page viewed directly, either in the situations described above, or when the 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}} <div>Redirect page</div>[[File:Redirectltr.png|link=Special:FilePath/Redirectltr.png]] <span class="redirectText">[[Transport]]</span></blockquote>(See the actual {{no redirect|Transportation}} redirect page.) |
| | | |
| Redirects to articles that begin with a lowercase title, for example the redirect from the page at [//en.wikipedia.org/w/index.php?title=EBay.com&redirect=no Ebay.com] to the article at [[w:eBay|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 DISPLAYTITLE<nowiki>. (Usually, the template {{</nowiki>[[Template:Lowercase title|Lowercase title]]<nowiki>}} is used to implement the DISPLAYTITLE magic word for lowercase titles.)</nowiki> | | Redirects to articles that begin with a lowercase title, for example the redirect from the page at [//en.wikipedia.org/w/index.php?title=EBay.com&redirect=no Ebay.com] to the article at [[w:eBay|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 DISPLAYTITLE<nowiki>. (Usually, the template {{</nowiki>[[Template:Lowercase title|Lowercase title]]<nowiki>}} is used to implement the DISPLAYTITLE magic word for lowercase titles.)</nowiki> |