PHP 批改HTTP头 -Modify HTTP Headers
程序员文章站
2022-03-17 17:45:35
...
PHP 修改HTTP头 --Modify HTTP Headers
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://相关文章
相关视频
上一篇: 这里需要用到什么知识