Problem with 301 redirects
Posted: Mon Dec 03, 2012 5:11 pm
Hello all!
I've installed CMSMS dozens of times but just installed the latest version for a client.
For some reason my 301 redirects aren't working and I simply copied from another client - albeit an older version of CMSMS.
Here's my code...can anybody help me figure out what's going wrong?
Thanks so much!
#Sub-dir e.g: /cmsms
RewriteBase /
RewriteRule ^index.asp$ http://www.jameskeep.com/index.php [R=301,L]
RewriteRule ^users/serview.asp?suid=150$ http://www.jameskeep.com/services/payro ... eping.html [R=301,L]
RewriteRule ^users/serview.asp?suid=151$ http://www.jameskeep.com/services/tax-p ... ation.html [R=301,L]
RewriteRule ^users/serview.asp?suid=340$ http://www.jameskeep.com/index.php [R=301,L]
RewriteRule ^users/serview.asp?suid=153$ http://www.jameskeep.com/privacy-policy.html [R=301,L]
RewriteRule ^users/serview.asp?suid=332$ http://www.jameskeep.com/resources.html [R=301,L]
RewriteRule ^users/serview.asp?suid=6930$ http://www.jameskeep.com/resources.html [R=301,L]
RewriteRule ^users/contactus.asp?suid=6866$ http://www.jameskeep.com/contact-us.html [R=301,L]
RewriteRule ^users/UserSitemap.asp$ http://www.jameskeep.com/sitemap.html [R=301,L]
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# 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]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
I've installed CMSMS dozens of times but just installed the latest version for a client.
For some reason my 301 redirects aren't working and I simply copied from another client - albeit an older version of CMSMS.
Here's my code...can anybody help me figure out what's going wrong?
Thanks so much!
#Sub-dir e.g: /cmsms
RewriteBase /
RewriteRule ^index.asp$ http://www.jameskeep.com/index.php [R=301,L]
RewriteRule ^users/serview.asp?suid=150$ http://www.jameskeep.com/services/payro ... eping.html [R=301,L]
RewriteRule ^users/serview.asp?suid=151$ http://www.jameskeep.com/services/tax-p ... ation.html [R=301,L]
RewriteRule ^users/serview.asp?suid=340$ http://www.jameskeep.com/index.php [R=301,L]
RewriteRule ^users/serview.asp?suid=153$ http://www.jameskeep.com/privacy-policy.html [R=301,L]
RewriteRule ^users/serview.asp?suid=332$ http://www.jameskeep.com/resources.html [R=301,L]
RewriteRule ^users/serview.asp?suid=6930$ http://www.jameskeep.com/resources.html [R=301,L]
RewriteRule ^users/contactus.asp?suid=6866$ http://www.jameskeep.com/contact-us.html [R=301,L]
RewriteRule ^users/UserSitemap.asp$ http://www.jameskeep.com/sitemap.html [R=301,L]
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# 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]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]