There are times when you will want to redirect a page or a menu link to a different page in GetSimple CMS. For example:

  • SEO -- To tell search engines where to find page content that has moved on your website without having a negative impact on the ranking of your web page.
  • Bookmarks/Favourites -- Make it easy for visitors using a link or a bookmark pointing to the old address of a page.
  • Links -- Whether there might links pointing to the page on your website or there are links are another website, it is never a good idea to leave people with a dead link. Even if you didn't put a link on other websites, others may have.
  • Removed Content -- If you are removing content on your website for any reason (information was obsolete, no longer irrelevant or just undesireable), create a single page with a message to that effect and then redirect all your removed content pages to that single page to inform people that the page was removed. Besides being able to offer a friendlier message than a 404 page, if you ever decide to modify the message, you'll only have to do it in one place. Alternatively, create a custom 404 page.
  • External Link -- Useful if you want to have a menu item that links directly to a file or to a page on a different website.

As of GetSimple 3.1, there is still no easy way to redirect a page or link to a different URL. Fortunately, you can easily create a redirect template which will enable you to accomplish this.

Here are easy to follow directions on how to create a redirect template for GetSimple CMS:

  1. Copy and paste the following into a new file. Call it "redirect.php":

    <?php if(!defined('IN_GS')){ die('You cannot load this page directly.'); }
    /****************************************************
    * @File: redirect.php
    * @Package: GetSimple
    * @Action: Your Theme
    * *****************************************************/
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: " . get_page_meta_keywords(false));
    exit();
    ?>

  2. Place the file in the /theme/[YourTheme]/ folder of your GetSimple website where [YourTheme] is the name of the theme you are using on your site.
  3. Log into your GetSimple admin site and edit the page you want to redirect.
  4. In the editor, click on the Page Options button at the top of the editor.
  5. You will need to make two changes:
    • Place the address of the destination page (e.g. http://www.tngconsulting/tech-tips/) in the Tags & Keywords field.
    • Set the Template field to redirect.php.
    • Optional: In the Description field, put the date that you created the direction or other helpful information to help you remember why you did this in the first place. That way you can go through these redirected pages every six months or so and get rid of old ones just to keep things tidy on your site.
  6. Click the Save Updates button at the bottom of the page.

Now when anyone tries to view the page you just edited will automatically be redirected to the address you entered above.