Ech, my query string look’s like:
http://localhost/index.php?page=public&another=http://www.google.com?omg=tt&nop=asd
And afcourse i rewrite it with regex to:
regex:
RewriteRule ^pass-([^=]*)=([^=]*)$ index.php?page=$1&another=$2 [L]
http://localhost/pass-url=http://www.google.com?omg=tt&nop=asd
(1)But then url becomes to: http://www.google.com only.
If i try urlencode with this url without regex:
http://localhost/index.php?page=public&another=http://www.google.com?omg=tt&nop=asd
it echo:
http%3A%2F%2Fwww.google.com%3Fomg%3Dtt
(2)In this case &nop=asd part gone.
So how to make (1) work and why (2) do this ?
The biggest question would be how to pass two question and ampersand in query string ?
Any suggestion regarding this situation ?
Problem is in your rewrite rule. Have it like this:
Note that additional QSA flag which will make sure to preserve original query parameters.