Redirect Removed Pages - where to put your redirection code

For suggestions and questions regarding CMSMS Core documentation.

Moderator: DIGI3

Locked
catchlight
Forum Members
Forum Members
Posts: 20
Joined: Wed Jan 28, 2009 1:12 am

Redirect Removed Pages - where to put your redirection code

Post by catchlight »

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...

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]
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

Code: Select all

# Place your 301 redirections here
# For more information visit http://docs.cmsmadesimple.org/customizing/redirect-removed-pages
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.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Redirect Removed Pages - where to put your redirection c

Post by DIGI3 »

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.
Not getting the answer you need? CMSMS support options
Locked

Return to “[locked] Documentation”