ThinkPHP框架网站内页(非首页)链接添加301跳转代码鹿泽2024年3月15日技术教程 跳转代码如下(举例说明的链接): 在index.php文件添加一下代码: $url = ‘域名/链接.html’; if($url == $server) { header(‘HTTP/1.1 301 Moved Permanently’); header(“Location:/seo/链接.html”);