我在localhost:8000/index.html
有一个Nodejs游戏,我的网站在localhost:80
。如何使用PHP从端口80重定向到8000?
header("Location: localhost:8000/index.html");
答案 0 :(得分:0)
在此已回答:
PHP Redirect Same Address Different Port
这样做的好处是它是动态的。这意味着,如果您曾经碰巧拥有另一个不同于localhost的URL,那么它也将起作用。