htaccess gives 404 i qualified the page is there

I have a site created specific for mobiles. I added the code below into my htaccess for a redirect but it does not seem to work.

Can anyone enlighten me please

custom redirects

RewriteEngine on
Redirect 301 /cartypes.php?cartype=12 http://m.cartypecompany.com/redcars.php

end custom redirects


Source: .htaccess

1 Comment

  1. Digin Dominic

    Redirect directive is not used with mod_rewrite's RewriteEngine On and you need a RewriteCondto match query string. Use this rule:
    RewriteEngine on

    RewriteCond %{HTTP_HOST} =m.cartypecompany.com
    RewriteRule ^redcars.php$ /cartypes.php?cartype=12 [L,NC,QSA]

    Reply

Leave a Reply