301 redirect to a URL with WWW/IIS 301 redirect to a domain name starting with WWW

Source: Internet
Author: User

Prerequisites for using this method

1: You have control over the server and can operate IIS

2: You need to create two sites, one without WWW and the other with www.


If your website is zuogewangzhan.com, then the http://zuogewangzhan.com/vps.html was included for other reasons.


And what you want is that http://www.zuogewangzhan.com/vps.html is included


At this time, we need to redirect to 301.

In IIS, create a website named www.zuogewangzhan.com and set it to the original website directory of zuogewangzhan.com.


This ensures that www.zuogewangzhan.com can be accessed normally. Then set redirection in the original IIS Site of zuogewangzhan.com

Redirect to http://www.zuogewangzhan.com $ q note, followed by $ Q to ensure that the parameters after the URL can also be passed correctly (that is, access to ingress)

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.