When renaming, deleting and restoring pages in MediaWiki, it is necessary to know how to redirect URL's that are no longer working. When visitors bookmark pages or Google caches your old pages, they will get a "404 not found" error when looking for the old link. This makes it necessary to create a redirect in that page to have it go to another valid page. This article will outline how to add and remove redirects in your MediaWiki pages.

Adding a redirect to MediaWiki

  1. Log into MediaWiki.
  2. Select the page you want to redirect.
  3. Add the redirect code to the page.The redirect code will look like the following:
    #REDIRECT [[pagename]]
    In this case we will use the following to redirect to the "HTML Wiki for Beginners Home page". The code will look like the following:
    #REDIRECT [[HTML Wiki for Beginners Home page]]

    Wrong place for code MediaWikiImportant! If you place the redirect code in the incorrect place, See image to the right, the redirect will not work.
    Broked redirect MediaWikiYou will get a page like the snapshot to the right if the code is places in teh wrong location of the page. The Redirect code must be placed at the top of the page before all text in the page.


    Correct redirect code MediaWikiOnce you add the redirect code to the top of the page like the image to the right, Save the page.

  4. Correct redirect in MediaWikiVisit the page to check if the redirect is working. The page should load with a redirect message saying "Redirect Page" with the page name the redirect points to.

Removing a redirect in MediaWiki

  1. Log into MediaWiki.
  2. Find the page you want to edit by going to special pages on the left in the navigation sidebar. Select "All pages" in the "Lists of pages" section. Find the page and selct it.
  3. Edit page to remove redirect MediaWikiClick the Edit link at the top left.
  4. Delete redirect code MediaWikiFind the redirect code and delete it. Now the page will no longer redirect.
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2230
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5653

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!