Answer the question
In order to leave comments, you need to log in
How to redirect from a page without GET parameters to a page with GET parameters?
In this case, it is necessary that the slash is taken into account, that is, the task is:
Redirect from and from to
Did this, but there is a cyclic redirection:http://site.ru/page
http://site.ru/page/
http://site.ru/page?process=view
RewriteCond %{REQUEST_URI} ^/(page|page/)$
RewriteRule .+ http://site.ru/page?process=view [R=301,L]
RewriteCond %{REQUEST_URI} ^/(page|page/)$
it does not perceive the end of the line on page
or page/
and for some reason considers that the page with the address ending with a get-request page\?process=view
fits the regular expression page$
, which is strange. Answer the question
In order to leave comments, you need to log in
Don't forget to mark as solved.
well, don't forget to escape special characters in the regular season!!!
It was
RewriteCond %{REQUEST_URI} ^/(page|page/)$
RewriteRule .+ http://site.ru/page?process=view [R=301,L]
RewriteCond %{REQUEST_URI} ^/(page|page/)$
RewriteRule .+ http://site.ru/page\?process=view [R=301,L]
You need to work not with %{REQUEST_URI} but with %{QUERY_STRING}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question