Reputation: 133
How can I redirect from
http://host_name.com/booking?param=1¶m=2
to
http://host_name.com/fr/booking?param=1¶m=2
I tried it this way, but it doesn't work
RewriteCond %{HTTP_HOST} ^(.*)\/booking(.*)
RewriteRule ^/booking(.*) /fr/booking$2 [L, R=301]
Upvotes: 0
Views: 87
Reputation: 24448
So you should be able to do this to redirect the query string to a new one.
RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET\ /+booking\?param=([^&\s]+)¶m=([^&\s]+)
RewriteRule ^ /fr/booking?param=%1¶m=%2 [L, R=302]
Let me know how this works for you.
Upvotes: 1