Answer the question
In order to leave comments, you need to log in
How to make a redirect if the original URI has a GET parameter (that is, a question mark)?
Here is the redirect itself.
RewriteRule ^\?p=(\d+)$ index\.php/$1 [NC,L,R]
If you write a question mark in the second rewrite parameter, then there are no problems with this, it does not give errors and the GET parameter is passed, for example
RewriteRule ^ (\d+)$ index\.php/\?p=$1 [NC,L,R] (this is how it works, but I need it the other way around)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question