Answer the question
In order to leave comments, you need to log in
Can you help me compose a regular expression for htaccess?
We need a regular expression for HTACCESS that if after the domain there is immediately a question mark and symbols i.e.
exa.ru/?123123 redirect to exa.ru, but if "?123123" is not immediately after the domain, but something like this exa.ru/shop/?123123, then there is nothing to do, help plz, the task is very burning.
Answer the question
In order to leave comments, you need to log in
Try like this:
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^/$ /? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question