Pretty URLs conflicting with 301 redirects

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
liquid
Forum Members
Forum Members
Posts: 59
Joined: Sun Aug 07, 2005 10:20 pm

Pretty URLs conflicting with 301 redirects

Post by liquid »

I'm in the process of moving a static page site to a CMSMS site. The only issue is that we want to use pretty URLs, but the code for that doesn't work with the 301 redirects.

What happens is a redirect from site.com/contact.htm that should go to site.com/contact now goes to site.com/contact/?contact.htm

I'm using the pretty URL .htaccess info as provided in the wiki.

Any suggestions?
Pierre M.

Re: Pretty URLs conflicting with 301 redirects

Post by Pierre M. »

Hello,

by "as provided in the wiki" do you mean http://wiki.cmsmadesimple.org/index.php ... l_Settings I mean using "/docs/htaccess.txt" ?

I'm confused by your post. What do you have ? What do you want ? What are those 301 you are talking about ?

Pierre M.
User avatar
Tetsuo
Forum Members
Forum Members
Posts: 58
Joined: Wed Aug 19, 2009 12:00 pm
Location: UK

Re: Pretty URLs conflicting with 301 redirects

Post by Tetsuo »

I am also having this exact problem:

For example:
http://www.durantcricket.co.uk/outdoor- ... coreboards

This site uses pretty URL rewrite .htacess file from the page Pierre just mentioned. However, I want to set redirects for some old pages that are still indexed in Google:

http://www.durantcricket.co.uk/cricket-scoreboards.html
I want to redirect to >:
http://www.durantcricket.co.uk/outdoor- ... coreboards

So in my .htacess file, I have:
RedirectPermanent /cricket-scoreboards.html http://www.durantcricket.co.uk/outdoor- ... coreboards

However, the pretty URL rewrite causes a problem. When you visit http://www.durantcricket.co.uk/cricket-scoreboards.html, you get this:

http://www.durantcricket.co.uk/outdoor- ... oards.html

Any ideas? :(
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Pretty URLs conflicting with 301 redirects

Post by Rolf »

Tetsuo,

The redirect and the url rewriting are both in the same .htaccess file, therefore it isn't working like we want to.
Tested some options. This one comes the closest to...  :-\

Code: Select all

RedirectPermanent /cricket-scoreboards.html http://www.durantcricket.co.uk/index.php?page=outdoor-cricket-scoreboards

Regards, Rolf


ps. If you are talking about a lot of pages perhaps this module is an option:
http://dev.cmsmadesimple.org/projects/movedpages
Last edited by Rolf on Fri Oct 09, 2009 5:49 pm, edited 1 time in total.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Re: Pretty URLs conflicting with 301 redirects

Post by Ziggywigged »

Take a penny, leave a penny.
User avatar
Tetsuo
Forum Members
Forum Members
Posts: 58
Joined: Wed Aug 19, 2009 12:00 pm
Location: UK

[SOLVED] Re: Pretty URLs conflicting with 301 redirects

Post by Tetsuo »

Rolf,

Thank you for your help. Your suggestion was a good one that I hadn't thought of that would solve the 401 page error, but unfortunately, why I also really wanted to redirect these pages was so that search engines would begin to update to the new URL's, which they do eventually if there is an appropriate 301 redirect in place.

Ziggywigged - thank you!! That page contained the solution I was after, works great :)
Solved.
Post Reply

Return to “CMSMS Core”