Php implements 301 permanent redirection

Source: Internet
Author: User
Php implements 301 permanent redirection

The following code implements 301 Redirection. 301 redirection is a seo-friendly redirection method, which indicates that the content accessed by the search engine has been transferred to another address.

The following code implements 301 redirection in php:

  1. Header ("HTTP/1.1 301 Moved Permanently ");
  2. Header ("Location: http://www.open-open.com /");


Common redirection methods include 301 redirect and 302 redirect.

301 redirect: 301 represents a permanent transfer (Permanently Moved). 301 redirection is the best method for search engine friendliness after a webpage address is changed, we recommend that you use "301" for resolution.

302 redirect: 302 represents temporary transfer (Temporarily Moved). in the past few years, many Black Hat SEO have applied this technology extensively to cheat. At present, major search engines have been cracking down, such as Google's penalties for business.com and recently on BMW's German website in the past few years. Even if the website is not an objective spam, it is easy for search engines to misjudge it as spam and be punished.

Redirection, php

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.