Answer the question
In order to leave comments, you need to log in
Auto redirect from port 80 to 600?
At 600, for example, I have a webmord of a torrent client hanging on the port.
Apache hangs at 80.
You need to make an auto-redirect in 5 seconds from the home page to the webmord page, but so that the link is not tied to one address. So that I can redirect both 127.0.0.1:80 > 127.0.0.1:600 and 192.168.0.1:80 > 192.168.0.1:600 and mysite.ddns.org:80 > mysite.ddns.org: 600 without any problems.
How to do?
Tell me, please)
PS It is not necessary to suggest hanging a web face on port 80, this is not the way out)
Answer the question
In order to leave comments, you need to log in
If you need a redirect on the server side:
<?php
header("Location: http://".$_SERVER['HTTP_HOST'].":600/", true, 301);
?>
So fit?
write in the body tag onLoad="setTimeout('del()', 5000)"
function del()
{
adr="http://"+document.domain+":600";
window.location=adr;
}
You can also do rewrite using Indian tools, without any js/PHP/HTML/etc.
<meta http-equiv=«refresh» content=«pause_in_seconds;url=http://<?=$_SERVER['HTTP_HOST']»?>:600">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question