欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

PHP 批改HTTP头 -Modify HTTP Headers

程序员文章站 2022-03-17 17:45:35
...
PHP 修改HTTP头 --Modify HTTP Headers
Modify HTTP Headers

// See related links for more status codes // Use this header instruction to fix 404 headers// produced by url rewriting...header('HTTP/1.1 200 OK'); // Page was not found:header('HTTP/1.1 404 Not Found'); // Access forbidden:header('HTTP/1.1 403 Forbidden'); // The page moved permanently should be used for// all redrictions, because search engines know// what's going on and can easily update their urls.header('HTTP/1.1 301 Moved Permanently'); // Server errorheader('HTTP/1.1 500 Internal Server Error'); // Redirect to a new location:header('Location: http://www.example.org/'); // Redriect with a delay:header('Refresh: 10; url=http://www.example.org/');print 'You will be redirected in 10 seconds'; // you can also use the HTML syntax:// 
PHP 批改HTTP头 -Modify HTTP Headers

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频