301 Redirect's - Issues [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

301 Redirect's - Issues [SOLVED]

Post 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!
Last edited by slicencode on Mon Nov 09, 2009 7:09 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: 301 Redirect's - Issues

Post by Rolf »

Hi slicencode,

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

Grtz. Rolf  ;)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: 301 Redirect's - Issues

Post 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
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: 301 Redirect's - Issues

Post 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 :)
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: 301 Redirect's - Issues [SOLVED]

Post by Rolf »

Great! Nice website btw  ;)

®
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “CMSMS Core”