Answer the question
In order to leave comments, you need to log in
How to implement .htaccess redirect and merge while keeping domain name?
Good day.
The task is to redirect requests from one domain to another, but not everything is so simple.
For example: if the user typed site.ru/part in the browser, he should be given information from the site test.ru/part , but the link should remain site.ru/part in the browser.
There is access to both .htaccess,
there are many such pages (site.ru/part/subpart/global)
on the site.ru domain there are no site.ru/part, site.ru/part/subpart/global pages on the test.ru domain is
All that I have reached so far is to register the following in .htaccess site.ru:
RewriteCond %{HTTP_HOST}^site.ru$1
RewriteRule ^(part.*)$ http://test.ru/part [L]
Answer the question
In order to leave comments, you need to log in
You won't do that. mod_rewrite cannot make requests to another domain and return content.
If you want to do that then use mod_proxy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question