Domain 301 jump method, how to do 301 jump?

Source: Internet
Author: User
Keywords Station Guide
Tags .url application asp check click client code connect

IIS 301 redirect

Open the "Internet Information Services", right-click the folder or file you want to jump in the right-click menu, select "Properties" pop-up dialog box, "directory" option to find "connect to the resource is the content source" , Select "Redirect to URL" in the text box below to enter the page to jump to At the same time, the "client will be directed to" the following check box "resource permanent redirection" Click on the "Apply" .

Use code to do 301 redirect method:

1.PHP under the 301 redirect
<?
Header ("HTTP / 1.1 301 Moved Permanently");
Header ("Location: http://www.jzread.com/");
?>

Under ASP 301 redirect
<% @ Language = VBScript%>
<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.jzread.com/"
%>

3.ASP.NET under the 301 redirect
<script runat = "server">
private void Page_Load (object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader ("Location", "http://www.jzread.com/");
}
</ script>

4.ColdFusion under the 301 redirect
<.cfheader statuscode = "301" statustext = "Moved permanently">
<.cfheader name = "Location" value = "http://www.jzread.com/">

The following method, I tested, can be redirected, can be achieved a.com, b.com redirected to c.com. But asked to appear in the code can not be achieved a.com/news/index.html redirect to c. com / news / index.html on the page. But through the 301 redirect IIS can really achieve this, we can test, I have done 301 redirect case: http://301.whwzjs.net/catalog .asp? cate = 4 If, we need to redirect the domain name has a lot of content is included in Baidu, and, in search engines have a certain ranking, I suggest that we all use IIS 301 redirect, so that you can pass the site The weight, will not lead to traffic loss. For those new domain name to the old domain name, the new domain name does not have much traffic, you can also use the code to achieve redirection.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.