CMS Made Simple Forums

Redirect Removed Pages - where to put your redirection code
Page 1 of 1

Author:  catchlight [ Thu Jul 24, 2014 7:03 am ]
Post subject:  Redirect Removed Pages - where to put your redirection code


First up I'm using CMSMS 1.11.10 “Pinzon” as I write this.

I'd like to propose a one line text addition to this docs page ( that clarifies exactly where to place your 301 redirect within your sites htaccess file.

In the .htaccess file, I found that placing a redirect just before this stuff...

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

Seems to work. Placing it after doesn't. :'( Much time wasted finding this out and I'm sure others must have struck this.

For a real win, perhaps we could also have a new comment added to the htaccess.txt file that ships in the doc directory of CMSMS.

Something along the links of

# Place your 301 redirections here
# For more information visit

This is a very high ranking page when researching the topic of 301 redirecting with CMSMS, so I think it's important. We'd just need some input from developers what to actually say.

Author:  DIGI3 [ Wed Aug 13, 2014 4:40 pm ]
Post subject:  Re: Redirect Removed Pages - where to put your redirection c

Thanks, documentation has been updated. It probably won't get added to the default htaccess file as it's a bit out of the scope of what we can offer support for, but certainly worth documenting.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group