V
V
Vasily Terkin2014-08-27 10:36:14
htaccess
Vasily Terkin, 2014-08-27 10:36:14

301 redirect for all pages containing /td_d_slug_1/?

Hello!!
For half a day I have been struggling with the question of how to make a 301 redirect to the main page of the site from all pages with the parameter /td_d_slug_/ ...
That is, from all pages:
site.ru/td_d_slug_1
site.ru/td_d_slug_2
site.ru/td_d_slug_3
site.ru/td_d_slug_43
etc. to the main page of the site...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Elena, 2014-08-27
@Nidora

Try:

RewriteEngine On
RewriteCond %{QUERY_STRING} category=1
RewriteRule ^index.php http://site.ru/? [R=301,L]

category=1 is your /td_d_slug_/

V
Vasily Terkin, 2014-08-27
@nashput

unfortunately not working

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question