Difference between revisions of "Help:Redirects"

From SacredWiki
Jump to navigation Jump to search
m (1 revision(s))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
{{PD Help Page}}
 +
 
Redirects are used to forward users from one page name to another. They can be useful if a particular article is referred to by multiple names, or has alternative punctuation, capitalization or spellings.
 
Redirects are used to forward users from one page name to another. They can be useful if a particular article is referred to by multiple names, or has alternative punctuation, capitalization or spellings.
  
 
==Creating a redirect==
 
==Creating a redirect==
To create a redirect, you must start a new page with the name you want to direct from. Do this by typing the desired name into the search box, or straight into the URL (methods described on [[Help:Starting a new page]])
+
You may start a new page with the name you want to direct from (see [[Help:Starting a new page]]). You can also use an existing page that you are making inactive as a page by going to that page and using the "edit" tab at the top. In either case, you will be inserting the following code at the very first text position of the Edit window for the page:
 
 
For the text of the new page, enter the following:
 
 
  <nowiki>#REDIRECT [[</nowiki>''pagename''<nowiki>]]</nowiki>
 
  <nowiki>#REDIRECT [[</nowiki>''pagename''<nowiki>]]</nowiki>
where ''pagename'' is the name of the page you want to redirect users to.
+
where ''pagename'' is the name of the destination page. The word "redirect" is not case-sensitive, but there must be no space before the "#" symbol. Any text before the code will disable the code and prevent a redirect. Any text or regular content code after the redirect code will be ignored (and should be deleted from an existing page). However, to put or keep the current page name listed in a Category, the usual tag for that category is entered or kept on a line after the redirect code entry.
  
You can use the 'preview' button, to check that you have entered the correct page name (Generally you will be redirecting to an existing page name, so the link should be blue, not red). However, the ''preview page'' will not look like a standard redirect page, it will look like a numbered list with ''hopefully'' a blue link after the word "REDIRECT"
+
You should use the 'preview' button below the Edit window, or Alt-P, to check that you have entered the correct destination page name. The preview page will not look like the resulting redirect page, it will look like a numbered list, with the destination page in blue: 
 +
1. REDIRECT  <span style="color:blue">''pagename''</span>
 +
If the ''pagename'' as you typed it is not a valid page, it will show in red. Until there is a valid destination page, you should not make the redirect.
  
 
==Viewing a redirect==
 
==Viewing a redirect==
After creating a redirect, you can no longer get to that page name. The browser is always redirected! However near the top of the page, a link is provided. Click this to get back to the redirected page name, and "view" the redirect.
+
After making a redirect at a page, you can no longer get to that page by using its name or by any link using that name; and they do not show up in wiki search results, either. However, near the top of the destination page, a notice that you have been forwarded appears, with the source pagename as an active link to it. Click this to get back to the redirected page, showing the large bent arrow symbol and the destination for the redirect.
  
By doing this, you can do all the things that any wiki page allows. You can go to the associated discussion page to discuss the redirect. You can view the history of the page before the redirect was put in place. You edit the page if the redirect is wrong, and you can revert to an older version to remove the redirect.
+
By doing this, you can do all the things that any wiki page allows. You can go to the associated discussion page to discuss the redirect. You can view the history of the page, including a record of the redirect. You can edit the page if the redirect is wrong, and you can revert to an older version to remove the redirect.
  
 
==Deleting a redirect==
 
==Deleting a redirect==
There's generally no need to delete redirects. They do not occupy a significant amount of database space, and they do not show up in wiki search results. If a page name is vaguely meaningful there's no harm (and some benefit) in having it as a redirect to the most relevant existing page in your wiki. However...
+
There's generally no need to delete redirects. They do not occupy a significant amount of database space. If a page name is vaguely meaningful, there's no harm (and some benefit) in having it as a redirect to the more relevant or current page.  
  
If you ''do'' need to delete a redirect, e.g. if the page name of the redirect is offensive, or you wish to discourage people from referring to concept by that name, then you simply go to the redirect page, and follow the same procedure for deleting a page. See: [[Help:Deleting a page]]
+
If you do need to delete a redirect, e.g. if the page name is offensive, or you wish to discourage people from referring to a concept by that name, then you simply go to the redirect page as mentioned above, and follow the procedures at [[Help:Deleting a page]].
  
 
==Double redirects ==
 
==Double redirects ==
A double redirect (a page redirecting to a page which is itself a redirect) will not work. The redirecting will not follow through to the end of the chain. Instead people will just be presented with the relevant link (a view of the redirect page). This is a deliberate restriction, partly to prevent infinite loops, and partly to keep things simple. It avoids people building up an unpleasantly complicated tree of redirects!
+
A double redirect is a page redirecting to a page which is itself a redirect, and it will not work. Instead, people will be presented with a view of the next redirect page. This is a deliberate restriction, partly to prevent infinite loops, and partly to keep things simple.  
  
However this does mean that you should look out for double redirects and eliminate them, by changing them to be 1-step redirects instead. You are most likely to need to do this after a significant [[Help:Moving a page|page move]]. Use the 'what links here' toolbox link to find double redirects to a particular page, or use [[Special:DoubleRedirects]] to find them throughout the whole wiki.
+
However, you could look out for double redirects and eliminate them by changing them to be 1-step redirects instead. You are most likely to need to do this after a significant [[Help:Moving a page|page move]]. Use the "what links here" toolbox link to find double redirects to a particular page, or use [[Special:DoubleRedirects]] to find them throughout the whole wiki.
  
 
== A redirect to a page in the category namespace ==
 
== A redirect to a page in the category namespace ==
To prevent a page that redirects to a category from appearing in the category; precede the word Category with a colon like so : <nowiki>#REDIRECT [[:Category:Glossary]]</nowiki>
+
To prevent a page that redirects to a category from appearing in the category, precede the word "Category" with a colon:  
 
+
<nowiki>#REDIRECT [[:Category:Glossary]]</nowiki>
  
 +
{{Languages|Help:Redirects}}
  
 
[[Category:Help|Redirects]]
 
[[Category:Help|Redirects]]

Latest revision as of 22:16, 6 December 2010

PD Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. See Project:PD help/Copying for instructions. PD


Redirects are used to forward users from one page name to another. They can be useful if a particular article is referred to by multiple names, or has alternative punctuation, capitalization or spellings.

Creating a redirect

You may start a new page with the name you want to direct from (see Help:Starting a new page). You can also use an existing page that you are making inactive as a page by going to that page and using the "edit" tab at the top. In either case, you will be inserting the following code at the very first text position of the Edit window for the page:

#REDIRECT [[pagename]]

where pagename is the name of the destination page. The word "redirect" is not case-sensitive, but there must be no space before the "#" symbol. Any text before the code will disable the code and prevent a redirect. Any text or regular content code after the redirect code will be ignored (and should be deleted from an existing page). However, to put or keep the current page name listed in a Category, the usual tag for that category is entered or kept on a line after the redirect code entry.

You should use the 'preview' button below the Edit window, or Alt-P, to check that you have entered the correct destination page name. The preview page will not look like the resulting redirect page, it will look like a numbered list, with the destination page in blue:

1. REDIRECT  pagename

If the pagename as you typed it is not a valid page, it will show in red. Until there is a valid destination page, you should not make the redirect.

Viewing a redirect

After making a redirect at a page, you can no longer get to that page by using its name or by any link using that name; and they do not show up in wiki search results, either. However, near the top of the destination page, a notice that you have been forwarded appears, with the source pagename as an active link to it. Click this to get back to the redirected page, showing the large bent arrow symbol and the destination for the redirect.

By doing this, you can do all the things that any wiki page allows. You can go to the associated discussion page to discuss the redirect. You can view the history of the page, including a record of the redirect. You can edit the page if the redirect is wrong, and you can revert to an older version to remove the redirect.

Deleting a redirect

There's generally no need to delete redirects. They do not occupy a significant amount of database space. If a page name is vaguely meaningful, there's no harm (and some benefit) in having it as a redirect to the more relevant or current page.

If you do need to delete a redirect, e.g. if the page name is offensive, or you wish to discourage people from referring to a concept by that name, then you simply go to the redirect page as mentioned above, and follow the procedures at Help:Deleting a page.

Double redirects

A double redirect is a page redirecting to a page which is itself a redirect, and it will not work. Instead, people will be presented with a view of the next redirect page. This is a deliberate restriction, partly to prevent infinite loops, and partly to keep things simple.

However, you could look out for double redirects and eliminate them by changing them to be 1-step redirects instead. You are most likely to need to do this after a significant page move. Use the "what links here" toolbox link to find double redirects to a particular page, or use Special:DoubleRedirects to find them throughout the whole wiki.

A redirect to a page in the category namespace

To prevent a page that redirects to a category from appearing in the category, precede the word "Category" with a colon:

#REDIRECT [[:Category:Glossary]]