Was this page helpful?

Manually redirect a page

    Table of contents
    No headers

     

    If you need to redirect a MindTouch page manually so that it points to a differect page, you can do so by adding the following to the page:

     

    #REDIRECT [[/location]]

     

    Replace /page/location with the path that you want this page to redirect to

    When you add the Redirect code above to a page it will then remove that page from the hiearchy.  

    If you ever need to remove the redirect you can do so by typing out the URL of the page with the redirect on it and appending ?redirect=no to the URL.

     

    Use case:

    You want Test to redirect to Money

    Edit Test and remove all content except the following:

    #REDIRECT [[/money]]

    Then hit save.  This will automatically redirect you to money and Test will be removed from the hiearchy.

     

    Note:  #REDIRECT pages cannot have children pages; they are hidden from the page hierarchy, which prevents their children from being discovered.  If you need to redirect a page with child pages, such as the home page, use the code below.  If you ever need to remove the redirect you can do so by typing out the URL of the page with the redirect on it and appending ?action=edit to the URL.

     

    {{ meta.refresh(0, uri_to_page_to_redirect_to) }}
    
    Was this page helpful?
    Tag page
    Viewing 1 of 1 comments: view all
    To redirect to the home page, put the URI in quotes, i.e. {{meta.refresh(0, "http://mindtouch.com")}}

    Also, using "?action=edit" to get the page back does not work, use "?redirect=no" instead.
    Posted 09:16, 12 Jul 2011
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by