Answer the question
In order to leave comments, you need to log in
How to redirect requests from one site to another with substitution?
Hello dear!
There is a very popular site site.ru. The URLs of his pages look like:
Answer the question
In order to leave comments, you need to log in
I don't fully understand it myself, but it seems to work:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([\w\d]+)\.osite\.ru$
RewriteRule ^(.*)$ http://so.kr/index.php?url=http://%1.site.ru$1 [NC,L,QSA]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question