S
S
Stolov2011-06-16 22:55:46
Apache HTTP Server
Stolov, 2011-06-16 22:55:46

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

4 answer(s)
O
Oleg Bozhenko, 2011-06-17
@Stolov

If you need a redirect on the server side:
<?php
header("Location: http://".$_SERVER['HTTP_HOST'].":600/", true, 301);
?>

R
Ryuzaki, 2011-06-16
@Ryuzaki

So fit? write in the body tag onLoad="setTimeout('del()', 5000)"
function del()
{
adr="http://"+document.domain+":600";
window.location=adr;
}

S
Sergey, 2011-06-17
@bondbig

You can also do rewrite using Indian tools, without any js/PHP/HTML/etc.

D
Dmitry Sidorov, 2011-06-17
@Doomsday_nxt

<meta http-equiv=«refresh» content=«pause_in_seconds;url=http://<?=$_SERVER['HTTP_HOST']»?>:600"> 

of course :-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question