php中如何设置页面重定向
1、创建PHP文档,明确重定向之后的URI

2、使用header()函数创建302重定向,示例:
<?php
header("Location:$redirect");exit;

3、保存内容,在浏览器捕获跳转

4、使用header()函数创建301重定向,示例:
header('HTTP/1.1 301 Moved Permanently');header("Location: {$redirect}");

5、保存内容,捕获301重定向

阅读量:176
阅读量:34
阅读量:85
阅读量:92
阅读量:136