如果你的网页出现301或404对于用户体验来讲是一个非常严重的问题了,所以我们在做php header301或404时就必须小心再小心了,正同我来看看。
301跳转
代码如下 | 复制代码 | ||||||||||||
header('HTTP/1.1 301 Moved Permanently'); header('Location: http://www.abc.com/aaa/'); exit(); 不要漏了header(‘HTTP/1.1 301 Moved Permanently’); 不然返回不了301 404错误页面
|