Dear friends, help me figure out how to make 301 redirects with htaccess on this page:

http://site.ru/?yyy=hhh 

It is necessary: ​​that when you visit the page http://site.ru/?yyy=hhh user immediately transferred to http://site.ru/yyy .

I can not write a rule for the transfer. Campaign, everything is stuck in the question immediately after the slash.

    1 answer 1

     RewriteCond %{QUERY_STRING} ^yyy=hhh$ RewriteRule .* /yyy? [R=301,L] # ? - Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΈΡΠΊΠ»ΡŽΡ‡ΠΈΡ‚ΡŒ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ строки запроса ΠΊ Π½ΠΎΠ²ΠΎΠΌΡƒ url RewriteCond %{REQUEST_URI} ^/yyy$ RewriteRule .* /?yyy=hhh&v [R=301,L] # &v - Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΈΠ·Π±Π΅ΠΆΠ°Ρ‚ΡŒ цикличСского Ρ€Π΅Π΄ΠΈΡ€Π΅ΠΊΡ‚Π°