Answer the question
In order to leave comments, you need to log in
Redirect from slash to without slash in get-parameters?
There are pages like site.ru/?id=100
The search includes pages like site.ru/?id=100/
Question:
How to make a redirect from pages with a slash to without?
Currently using:
RewriteCond %{REQUEST_URI} !\?
RewriteCond %{REQUEST_URI} !\&
RewriteCond %{REQUEST_URI} !\=
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_URI} !\/$
RewriteRule ^(.*[^\/])$ /$1/ [R=301,L]
Answer the question
In order to leave comments, you need to log in
get is not part of the url, {REQUEST_URI} is not corny to it.
# 301 --- http://www.mydefile.ru/company/?section=torgovlya&PAGEN_1=9 => http://www.mydefile.ru/about/
RewriteCond %{QUERY_STRING} (^|&)section=torgovlya($|&)
RewriteCond %{QUERY_STRING} (^|&)PAGEN_1=9($|&)
RewriteRule ^company/$ /about/? [L,R=301]
?
at the end of the rewrite rule, it will remove the get itself. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question