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:
- Header ("HTTP/1.1 301 Moved Permanently ");
- 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