Redirect (re)moved pages
Welcome to the official CMS Made Simple documentation pages. We make a continuous effort to keep the information here up to date! However, dear user, we highly value your assistance in the process.
We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.
However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.
After several years maintaining a website you have added a lot of pages, but have also some removed or moved to another place in the hierarchy of the site. You don't want visitors to get a error 404 page, so you want to redirect them to the current page. The most common method is:
- Redirect 301 /index.php?page=something-old http://www.website.com/index.php?page=something-new
But when you use pretty urls the redirect 301 method in the .htaccess file might fail...
Try to use one of these rewrite rules instead:
- RewriteRule ^old/path/to/something.html$ http://www.website.com/new/path/to/something [R=301,L]
- RewriteRule ^something$ http://www.website.com/something [R=301,L]
- RewriteRule ^something/$ http://www.website.com/something/ [R=301,L]
- RewriteRule something.html$ http://www.website.com/something [R=301,L]
The above examples assume an apache webserver. The file to edit and the syntax will be different for different webservers
You can also use the Internal Page Link to redirect moved pages:
- Created a new "Section Header"
- Set the Title to "Redirects" and Page_Alias to "redirects"
- Set the Parent to "none", via the pulldown
- Set the page's Options checkboxes to Active = false and Show In Menu = false
- Then for each moved page:
- Add a new "Internal Page Link"
- Set the Parent of the new link to "Redirects", via the pulldown
- Set the Destination Page to the moved page's NEW location, via the pulldown
- Set the link's Options checkboxes to Active = true and Show In Menu = false
- Set the Page URL to the moved page's OLD URL
- Set the link's Page Alias to something unique like "moved-pages-alias"-redirect
One nice thing about this technique is that all these Internal Page Links can be placed under the "Redirects" parent page where they don't clutter up the primary page hierarchy.