Page 1 of 1

301 Redirect's - Issues [SOLVED]

Posted: Mon Nov 09, 2009 5:29 pm
by slicencode
Hi,

I'm having issues with a set of old links, I have about 50 of them which I've redirected to the new CMS pages in the following format (.htaccess), example:

Code: Select all

redirect 301 /resort/specialsmain.htm http://www.pointgrace.com/special-offers/
However, when I try /resort/specialsmain.htm , it goes to: http://www.pointgrace.com/special-offer ... lsmain.htm . Obviously, the first half is right, but then the rest, i.e. "?page=resort/specialsmain.htm" is random.

Any ideas, quite sure the solution is probably simple :)

Thank you!

Re: 301 Redirect's - Issues

Posted: Mon Nov 09, 2009 6:20 pm
by Rolf
Hi slicencode,

You probably find the answer in this topic:
http://forum.cmsmadesimple.org/index.ph ... 697.0.html

Grtz. Rolf  ;)

Re: 301 Redirect's - Issues

Posted: Mon Nov 09, 2009 6:53 pm
by slicencode
Thanks Rolf, I had tried that and it still hadn't worked. Case in point, example:

Code: Select all

RewriteRule ^2007timeless.htm$ http://www.pointgrace.com/special-offers/ [R=301,L]
Doesn't work here: http://www.pointgrace.com/resort/specia ... meless.htm

Full Htaccess

Code: Select all

RewriteEngine on
#
#Sub-dir e.g: /cmsms/
RewriteBase /

RewriteRule ^2007timeless.htm$ http://www.pointgrace.com/special-offers/ [R=301,L]

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
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 ^(.+)$ http://208.86.158.213/index.php?page=$1 [QSA]

RewriteCond %{HTTP_HOST} ^pointgrace.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.pointgrace.net$
RewriteRule ^/?$ "http\:\/\/www\.pointgrace\.com" [R=301,L]
Any further help is much appreciated... Cheers

Re: 301 Redirect's - Issues

Posted: Mon Nov 09, 2009 7:09 pm
by slicencode
Okidok, I figured it out for those will encounter the issue :)

This is the correct format:

Code: Select all

RewriteRule ^oldfolder/file.html$ http://www.domain.com/newfolder [R=301,L]
No starting slash on the old path and no trailing slash on the new path :)

Good luck :)

Re: 301 Redirect's - Issues [SOLVED]

Posted: Mon Nov 09, 2009 7:25 pm
by Rolf
Great! Nice website btw  ;)

®