Problem replacing query string

The url I want to redirect is:

http://hostname/en/guides?country=275

…and I want to redirect to:

http://hostname/search/275

My rules is:

RewriteCond %{QUERY_STRING} ^country=(.*)$ [NC]
RewriteRule ^en/guides /search/%1 [NC,L,R=301]

… but the query string replacement is not working.
Do you know what’s wrong with it ?

Thanks.

Rata,

Well, your mod_rewrite code should work … despite the four pedantic things I find objectionable with it. Of course, that assumes an Apache 2.x server and a test URL of precisely hostname/en/guides?country=275 AND that mod_rewrite is enabled and operates out of the .htaccess file (standard).

Do you have any other mod_rewrite before this which could hijack the URI (using (.*) where it’s inappropriate leads me to believe that the answer is probably yes). If so, please display ALL your mod_rewrite code so the conflicts can be uncovered.

Regards,

DK