Let's say the IIS 301 redirect approach:
301 redirect in IIS
Open Internet Information Services, right-click the folder or file you want to jump to, in the pop-up right-click menu, select Properties Pop-up dialog box, under the Table of Contents option to find "Connect to resource Content source", select "Redirect to URL", in the following text box, enter the page to jump to the same time, Click "Apply" to select "permanently redirect clients" to the checkbox below.
Use code to do 301 redirects:
301 redirects under 1.PHP
? Header ("http/1.1 moved Permanently"); Header ("location:http://www.mydomain.com/"); ?>
|
301 redirects under 2.ASP
<%@ Language=vbscript%> <% Response.status= "Moved Permanently" Response.AddHeader "Location", "http://www.mydomain.com/" %> |
3.ASP. NET, 301 redirects
<script runat= "Server" > private void Page_Load (object sender, System.EventArgs e) { Response.Status = "Moved Permanently"; Response.AddHeader ("Location", "http://www.mydomain.com/"); } </script> |
301 redirects under the ColdFusion
<.cfheader statuscode= "statustext=" "Moved Permanently" > <.cfheader name= "Location" value= "http://www.mydomain.com/" > |
The following methods, I have tested, can be redirected, can be implemented a.com,b.com redirect to c.com. But ask to appear in the code cannot implement a.com/news/index.html redirect to c.com/news/ Index.html on the page. and doing 301 redirects via IIS can do this. If we need to redirect the domain name has a large number of content by Baidu included, and, in search engines have a certain ranking, I suggest that we all adopt IIS 301 redirect, that, can pass the weight of the site, will not cause traffic loss. And for those new domain name to the old domain name, the new domain name and not much traffic, you can also use code to achieve redirection.
There are not to do or need to do 301 redirect friends, can add me qq:798843023