Answer the question
In order to leave comments, you need to log in
Set up a redirect from a subdomain to a page on another site?
There is a site with the address: main-site.ru.
A subdomain with the address subdomain.main-site.ru has been created that leads to another server with a dedicated ip (an A record with the ip has been created)
You need to create another subdomain of the subdomain2.main-site.ru type that would open a specific page with subdomain.main- site.ru (to get it like this - subdomain.main-site.ru/some-url )
at this address - subdomain.main-site.ru/some-url the page opens, but it also needs to open at the address: subdomain2.main -site.ru
How to do it right?
Answer the question
In order to leave comments, you need to log in
If you need a 301 redirect
RewriteCond %{HTTP_HOST} ^subdomain2\.main-site\.ru$ [NC]
RewriteRule ^$ http://subdomain.main-site.ru/some-url [R=301,L]
RewriteCond %{HTTP_HOST} ^subdomain2\.main-site\.ru$ [NC]
RewriteRule ^$ http://subdomain.main-site.ru/some-url [P]
if subdomain2.main-site.ru should go to subdomain.main-site.ru with 301, this is a simple redirect.
If you want to give content from that site on your domain, then
1. you have nginx - then you can proxy and use subdomain.main-site.ru as a backend
2. Using php proxy
3. mod_proxy + .haccess
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question