Answer the question
In order to leave comments, you need to log in
How to redirect a page with a parameter in htaccess?
Hello!
There is a URL that is a duplicate of the main page:
http://site.ru/?view=featured&layout=rt_fresco:frescofeatured
site.ru
)? RewriteCond %{QUERY_STRING} ^layout=rt_fresco:frescofeatured
RewriteRule ^http://site.ru(.*)$ http://czm-krasnodar.ru? [R=301,L]
Answer the question
In order to leave comments, you need to log in
Got it!
The rules are "plused", the RewriteRule condition will be met if all RewriteConds are true. First, we check the presence of some elements in the url ({QUERY_STRING}), then we replace the entire internal link with /. Your Cap.
RewriteCond %{QUERY_STRING} view=featured [NC]
RewriteCond %{QUERY_STRING} layout=rt_fresco [NC]
RewriteRule .* /? [R=301,L]
Article helpedhttp://max22.ru/server/htaccess/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question