S
S
sensei_012016-01-20 11:48:01
htaccess
sensei_01, 2016-01-20 11:48:01

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

1 answer(s)
O
Oleg Krasnov, 2016-01-29
@OKrasnov

Try like this:

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^/$ /? [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question