Page 1 of 1

Pretty URLs conflicting with 301 redirects

Posted: Thu Feb 21, 2008 3:49 pm
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?

Re: Pretty URLs conflicting with 301 redirects

Posted: Thu Feb 21, 2008 8:55 pm
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.

Re: Pretty URLs conflicting with 301 redirects

Posted: Thu Oct 08, 2009 3:27 pm
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? :(

Re: Pretty URLs conflicting with 301 redirects

Posted: Thu Oct 08, 2009 8:23 pm
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

Re: Pretty URLs conflicting with 301 redirects

Posted: Thu Oct 08, 2009 8:37 pm
by Ziggywigged

[SOLVED] Re: Pretty URLs conflicting with 301 redirects

Posted: Fri Oct 09, 2009 8:09 am
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.