T
T
Tonako2015-07-31 22:34:28
htaccess
Tonako, 2015-07-31 22:34:28

How to make a redirect through htaccess if there is a get parameter?

let's say if the site was accessed and there is a get parameter category
site.ru/?category=72
then we redirect to the main site.ru

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2015-07-31
@Tonako

RewriteEngine on
RewriteCond %{QUERY_STRING} ^category=[0-9]+$
RewriteRule ^$ /?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question