繁体   English   中英

使用 php 从一个端口重定向到另一个端口

[英]Redirecting from one port to another using php

我在localhost:8000/index.html有一个 Nodejs 游戏,我的网站在localhost:80 如何使用 PHP 从端口 80 重定向到 8000?

header("Location: localhost:8000/index.html");

这里已经回答了:

PHP 重定向相同地址不同端口

这样做的好处是它是动态的。 这意味着如果你碰巧有另一个 url 而不是 localhost 这也可以。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM