<?php
// 获取主机地址
$host = $_SERVER['HTTP_HOST'];
// 自定义端口号
$customPort = 81;
// 创建完整的URL,包括主机地址和自定义端口号
$redirectUrl = "http://$host:$customPort/"; // 替换为你的页面路径
// 使用header函数发送重定向
header("Location: $redirectUrl");
exit; // 确保脚本停止执行
?>