Answer the question
In order to leave comments, you need to log in
How to redirect a site from a domain to a subdomain so that the main domain shows status 200 when redirecting?
Hi guys!
I can't understand the issue.
It is necessary that when you click on site.ru, it will go to site.site.ru . But at the same time, the site.ru server code gave the status 200, not 301.
Is this possible? If not, how can it be done with a script?
Answer the question
In order to leave comments, you need to log in
Code 200 does not imply a redirect.
upd: But allows "redirect via update"! Thanks to wisgest for the note, because meta with http-equiv is an analogue of the HTTP header.
HTTP
version: HTML version:
<!-- в <head> -->
<meta http-equiv="refresh" content="0;url=http://site.site.ru/" />
window.location.replace("http://site.site.ru/");
You just need to mirror the site with a php script and you will be happy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question