301 Steering Definition
301 Turn (or call 301 Redirect, 301 jump) is one of the status codes in the header information (header) in the HTTP data stream returned by the server when the user or search engine sends a browse request to the Web server, indicating that this page is permanently transferred to another address.
Other common status code also includes, 200 means all normal, 404 Web pages can not find, 302 temporary turn, and so on.
Web site to do the steering method
Web site steering methods mainly include: 301 turn, 302 turn, JavaScript turn, php/asp/cgi turn, meta-refresh web meta refresh, etc. The 302 steering may have URL normalization issues. Other methods are commonly used cheating, of course, not to say that can not be properly used, the method itself is not wrong, but the cheater used more, the search engine for these suspicious turn are very sensitive. Why take the risk?
301 Necessity of turning
When page A is redirected to page B with 301 redirects, the search engine can be sure that page a permanently changes location, or that it doesn't actually exist, and that the search engine will use page B as the only effective target. Advantage is that
First, there is no web site normalization problem
Second, also very important, page A's PR page level will be uploaded to page b
Third, the collection will not be because the domain name replacement does not.
Realize
CODE:
<?php
$url = ""];
Header ("http/1.1 moved Permanently");
Header ("Location: $url");
?>
As shown in the PHP code above. You can implement this function. Where is the code to put it? We take Discuz6.0 as an example
index.php
archiver/index.php
forumdisplay.php
viewthread.php
space.php
tag.php
blog.php
Find the previous file in the old domain name and add the above code. The update is good.
Test
It's easy. To test it, use the Curl software to check it.
#curl-I.
Http/1.0 Moved Permanently
Date:tue, 2008 06:27:39 GMT
Server:apache
Location:
Http://www.php100.com
If you see the top of the http/1.0 moved permanently, it is OK. The next time a link is linked, it will automatically turn to a new link, and the search engine will automatically update to the new link as well.