Hello, dear! It is necessary to redirect view requests
Osite.ru/anything.php?sub=anything
on
so.kr/index.php?url=http://site.ru/anything.php?sub=anything
(for further work with the received url).
The main problem in the required URL is the possible presence of two question marks. Mod_rewrite, naturally handles only the first. For example:
RewriteCond %{HTTP_HOST} ^(.*)osite\.ru$ [NC] RewriteRule ^(.*)$ http://so.kr/index.php?url=http://%1site.ru$1 [R=301,L,QSA]
Seeing that the "?" Sign is already present in the URL, mod_rewrite replaces the second question mark with "&". That is, the URL
Osite.ru/anything.php?sub=anything
redirects to
so.kr/index.php?url=http://site.ru/anything.php&sub=anything
and it is necessary, as I said, on:
so.kr/index.php?url=http://site.ru/anything.php?sub=anything
Tell me, please, is it possible to solve the problem using mod_rewrite?
Thanks in advance for any hints!