Page 1 of 1

htaccess redirect doesn't work with default .htaccess

Posted: Sun May 08, 2011 3:31 pm
by admsh
I'm trying to redirect old html pages to their new locations on the newly-built cmsms website using .htaccess 301 redirect.

I think the code is conflicting with the default syntax from the .htaccess file that was in the docs directory (brand new install of 1.9.4.1)

I'm trying to use this code:

Code: Select all

Redirect 301 /page.htm http://my.site.com/page
But what happens is that when I try to go to http://my.site.com/page.htm, the browser is automatically redirected to http://my.site.com/page?page=page.htm

How can I change the .htaccess code so that these 301 redirects are not affected by the other rewrites?

Re: htaccess redirect doesn't work with default .htaccess

Posted: Wed Aug 10, 2011 4:35 pm
by 10010110
Yeah, I have the same problem. It would be really great if anybody could shed some light on this. It’s really important because otherwise the new sites have to rebuild their search engine ranking from scratch since basically the whole site has gone and there’s a new one now that has to be reindexed completely.

Re: htaccess redirect doesn't work with default .htaccess

Posted: Wed Aug 10, 2011 7:40 pm
by Rolf
Try something like:

Code: Select all

RewriteRule page-alias.html$ http://www.cmsmadesimple.org/path/to/page-alias [R=301,L]

RewriteRule ^page-alias$ http://www.cmsmadesimple.org/path/to/page-alias [R=301,L]
Hope this helps,

Rolf

Re: htaccess redirect doesn't work with default .htaccess

Posted: Thu Aug 11, 2011 1:46 am
by 10010110
Yes! I’ve tried the first of your suggestions and it’s working great, thank you! :)

Re: htaccess redirect doesn't work with default .htaccess

Posted: Sat Aug 13, 2011 5:35 pm
by replytomk3