Redirect Removed Pages - where to put your redirection code
Posted: Thu Jul 24, 2014 7:03 am
Hi,
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 (http://docs.cmsmadesimple.org/customizi ... oved-pages) 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...
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
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.
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 (http://docs.cmsmadesimple.org/customizi ... oved-pages) 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...
Code: Select all
# 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]
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
Code: Select all
# Place your 301 redirections here
# For more information visit http://docs.cmsmadesimple.org/customizing/redirect-removed-pages