Set up Httpd.ini and. htaccess301 redirect Code promotion rankings and collection

Source: Internet
Author: User

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

Since the site moved, ranking, included has been falling, this is how it? At ordinary times site: domain name, will find the new addition of content, recently not only declined, has not been included in the new content. Halo! Today, i accidentally searched my website, found that the Web site is not with WWW, I again site: without the WWW site, found that the new content is all included! I analyzed, so dispersed the weight of the site, the ranking will naturally decline.

I used to use Linux+apache, with. Htaccess has done 301 redirects, has been very stable, because the speed is not very stable, so changed space. This space is built on the Windows+iis, speed can also, because not too pay attention to 301 redirect, has not been in charge of him, since the discovery is no longer included with the WWW. Web site, the engine ranked decline, only to know the importance of 301. 301 Advantages of redirection are: 1. Increase the weight of the domain name; 2. Can promote the effect of search engine optimization; 3. Conducive to the Web page PR transmission; 4. To the user experience is friendly; 5. The Optimization of Web page collection.

So how to do 301 Redirect, Baidu for a long time to find available 301 redirect code, is to share with you.

1. I do under the Linux+apache virtual host 301 redirect Code

In the local build a txt text, copy the following code, save uploaded to the space root directory, and then renamed. htaccess, you can ok!

Rewriteengineon

REWRITECOND%{HTTP_HOST}^ONLIYOU.COM[NC]

rewriterule^ (. *) $http://www.onliyou.com/$1[r=301,l]

2. I do under the Windows+iis virtual host 301 redirect Code

Build a Httpd.ini file, with Notepad open copy the following generation to buy, upload to the space root directory.

[Isapi_rewrite]

CacheClockRate3600

RepeatLimit32

rewritecondhost:^onliyou\.com$

Rewriterule (. *) Http\://www\.onliyou\.com$1[i,r]

Hope to help ... This article source network, the Ultimate editor: Onliyou

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.