Answer the question
In order to leave comments, you need to log in
How to rewrite the url when submitting a form using the GET method?
There may be another way to change the query string, but it's not obvious to me.
It is necessary to redirect to the
request when requesting
. The following rules cause a circular redirect./?q=поисковой%20запрос
/search/поисковой%20запрос
RewriteCond %{QUERY_STRING} ^q=(.*)$ [NC]
RewriteRule ^/* /search/%1? [NC,L,R=301]
RewriteRule ^search/(.*)$ index.php?q=$1 [L,QSA]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question