V
V
Vladimir Chanaev2017-01-09 10:46:30
htaccess
Vladimir Chanaev, 2017-01-09 10:46:30

How to make a 301 redirect from a question at the end of a URL to a no-question?

Hello!
By some miracle, Yandex found and indexed pages like https://site.ru/catalog?
Without additional parameters after the question. Redirecting known parameters after a question is easy.
How to make a 301 redirect from https://site.ru/catalog? on https://site.ru/catalog
I tried variations of the following character:

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

And they don't work!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question