301 Steering Definition
301 Turn (or 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. Indicates that this page is permanently transferred to another address.
Other common status codes also include, 200 means all normal, 404 Web pages are not found, 302 temporary turn, and so on.
Web site to do the method of steering
Web site steering methods mainly include: 301 turn, 302 turn, JavaScript turn, php/asp/cgi turn, meta-refresh page 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 The necessity of steering
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. The advantage is that
First, no URL normalization issues
Second, also very important, page A's PR page level will be uploaded to the page B
Third, not because the domain name replacement does not.
Implement
CODE:
<?php
$url = ""];
Header ("http/1.1 moved Permanently");
Header ("Location: $url");
Like the PHP code on the diagram 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
finds the previous file in the old domain name and adds the above code. The update is good.
Testing
is easy. To test, use the Curl software to check.
#curl-i
http/1.0 Moved Permanently
Date:tue, May 2008 06:27: GMT
Server:apache
Location:&nbsP
If you see the http/1.0-Moved permanently above, it's 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