The following code implements 301 redirection. 301 redirection is a SEO search engine-friendly redirection method. Its purpose is to tell the search engine that the content currently being accessed has been transferred to other addresses. The following is the code for php to implement 301 redirection:
Commonly used redirect methods are: 301 redirect, 302 redirect 301 redirect:: 301 stands for Permanently Moved. 301 redirect is the best way to be search engine friendly after the web page changes its address. As long as it is not a temporary move, it is recommended to use 301 for redirection. 302 redirect:: 302 represents Temporarily Moved. In the past few years, many Black Hat SEOs have widely used this technology to cheat. At present, all major search engines have stepped up their crackdowns, such as Google's punishment of business.com in previous years and its recent punishment of BMW's German website. Even if a website is not spam objectively, it can easily be misjudged as spam by search engines and punished. |