In our website construction, we often encounter the need for Web page redirection: Like the site adjustment, such as changing the directory structure of the Web page, the page was moved to a new address, or the extension of the page name, If you need to change. php to. html or. shtml, in this case, if you do not redirect, the user's favorites or the old address in the search engine database can only give access to a 404-page error message, and the access traffic is lost; as some sites registered with multiple domain names, they also need to be redirected to allow users accessing these domains to automatically jump to the main station. Point, and so on.
Common redirection methods are: Redirect, 302 redirect and Meta Fresh:
redirect:301 represents a permanent transfer (permanently moved), 301 redirect is the best way to search engine friendliness after a Web page change, and it is recommended that you use 301来 as long as it is not temporarily moved. 302 redirect:302 on behalf of temporary transfer (temporarily moved), in the previous years, many black Hat seo has been widely used in this technology cheating, at present, major search engines have intensified the crackdown, Like Google's previous years of business.com and recent penalties for BMW's German website. Even if the site is not objectively spam, it is easy to be mistaken for the search engine spam and be punished. Meta Fresh: This was more prevalent 2000 years ago, but it is now rare. It is specifically through the meta instructions in the Web page, after a specific time to redirect to the new page, if the delay time is too short (about 5 seconds), will be judged as spam.
Here we mainly talk about how to implement page redirection through the redirect
IIS Server implements 301 redirect
* Open Internet Information Services Manager, right-click on the page or directory you want to redirect, see figure below
* Select Redirect to URL
* Enter the address of the target page in the dialog box
* Remember, check "permanent Redirection of resources"
* Of course, finally click "Apply"
Apache Server implements 301 redirect
In contrast, http://www.aliyun.com/zixun/aggregation/14417.html ">apache is much simpler to implement than IIS." In Apache, there is a very important file. htaccess, with its settings, can achieve a lot of powerful features, 301 redirect is just one of them.
Redirect permanent/http://seo.highdiy.com/, redirecting content from directory to http://seo.highdiy.com/
REDIRECT Permanent/old.html http://seo.highdiy.com/new-url/redirect page old.html content to http://seo.highdiy.com/new-url/
A more complex match can be achieved by reasonably configuring regular expressions in the redirection parameters. Interested friends can refer to the Apache manual.
Other methods include:
PHP 301 Redirect
? Header ("http/1.1 moved Permanently");
Header ("location:http://seo.highdiy.com"); >
301 redirects under ASP
<%@ Language=vbscript%>
<% response.status= "Moved Permanently" Response.AddHeader "Location", "http://seo.highdiy.com"
ASP. NET 301 Redirect
Once the configuration is complete, check to see if it is correct. The internet has many similar Server header checking tools, such as Check Server Headers tool-http Status Codes Checker or this web site redirection checker.
Author: highdiy
Original download: Point stone interactive search Engine Optimization Blog
Copyright NOTICE: This article has been authorized by the author issued, reproduced please retain the copyright information, is strictly prohibited all illegal copying.