PHP corrects HTTP headers-ModifyHTTPHeaders

Source: Internet
Author: User
PHP modifies the HTTP header -- Modify. PHP modifies the HTTP header -- 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:// 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.