Let say i have domain like this http://foo.com
this domain as present use .htaccess to RewriteCond
and the .htaccess code is like this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
This Rewrite will happen to all page request,
now i want to change this to make this only happen to all page except this page:
http://foo.com/en/rates.htm
because in that page i want to do 301 redirect like this Redirect 301 /en/rates.htm http://www.google.com/index.html
How to this in htaccess?
Thank you in advance,
GusDe
The
Redirectdirective you specified in your question should work, you can add it to your .htaccess file, before the Rewrite stuff block.If it doesn’t work still, maybe Apache has not loaded the mod_alias module, and then you can add this directive before the other Rewrite’s in the .htaccess file:
You could have a look at this Apache docs page.