mod_rewrite for pretty urls overwrites my .htaccess redirect

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.
Locked
MarkFresh

mod_rewrite for pretty urls overwrites my .htaccess redirect

Post by MarkFresh »

Hi

The old version of my site had a typical url of:

http://www.domain.co.uk/digital.asp?menu=media

and I am trying to redirect this to the new version of the page on the new site built on CMSMS, the url in this case is

http://www.domain.co.uk/our-work/web-digital

There are about 10 of these pages that I want to redirect using the .htaccess file (so that users and search engines go to the newest version of the page) so in this example I set:

Redirect 301 ^/digital.asp?menu=media$ http://www.domain.co.uk/my-work/web-digital

but because I use the mod rewrite for pretty urls, namely this:

RewriteRule ^(.+)$ index.php?page=$1 [QSA]

I believe that it cocks up my redirect. Is there a way round this without having to revert to the internal pretty url mechanism?


thanks

Mark


Slightly related to this post http://forum.cmsmadesimple.org/index.ph ... 059.0.html but I though I should write a new version
Pierre M.

Re: mod_rewrite for pretty urls overwrites my .htaccess redirect

Post by Pierre M. »

Hello,

do you have your rules in this order :
RedirectPermanent ^/digital.asp?menu=media$ http://www.blahblah.uk/my-work/web-digital
then
RewriteCond & rewriterule

This is very webserver level, hence not CMSms specific and you can test it with fake URLs and static files before plugin in CMSms behind.

Pierre M.
Locked

Return to “CMSMS Core”