Win2003iis host set 301 Steering Dede Dream system works

Source: Internet
Author: User
Keywords Construction Station Tutorial

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In order to reduce the weight of decentralization, you need to go to the site without WWW to the Web site with www, need to do 301 turn. The site is built in the Win2003iis virtual host, to the IDC service provider asked the server is to support pseudo static, so the webmaster began to churn 301 turn, and finally emperor. The following webmaster Paste 301 Jump Setting Method:

Changzhou Tall Building station here is a dream template, need to modify the Wwwroot folder in the index.php file, the following figure:

Open the index.php file, as shown in the following figure:

Add the following code:

$the _host = $_server[' http_host '];//get the current domain name

$request _uri = isset ($_server[' Request_uri '))? $_server[' Request_uri ']: '//To determine if there are parameters behind the address

if ($the _host = = ' czgds.com ')//change the domain name you want here

{

Header (' http/1.1 moved Permanently ');/Send 301 Head

Header (' location:http://www.czgds.com '. $request _uri);//jump to the address format you want

}

The code insertion position is as follows:

  

Finally, into the dream background → build → update home html→ home mode: Select dynamic browse → update homepage html

  

Test results: Browser address bar access czgds.com automatically jump to www.czgds.com

Recommend an online 301 redirect Detection tool: http://app.baidu.com/app/enter?appid=387928

The site's 301 redirect test results are as follows:

Also, let's introduce you to the win 2003 the method of setting 301 steering on the IIS server:

IIS creates a WWW Web site that binds the domain name set with www to the same settings as normal

Then create a site bound without WWW domain name, and then set the following figure:

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.