Categories
Htaccess redirect from url at end with question mark to without?
There are many duplicate pages, with urls ending with question marks. For example site.ru/services/shkola/? How to make a 301 redirect to a page without a question?
Answer the question
In order to leave comments, you need to log in
At the beginning of .htaccess add
RewriteEngine on RewriteCond %{THE_REQUEST} "^\S+ /[^?]*\? " RewriteRule .* /$0? [R=301,L]
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question