[Reserved] IIS Web site configuration without the www domain name to jump directly to the www domain name

Many times in order to unify the site entrance, the main domain name without the www needs to resolve to a domain name under the www record, when a client accesses the domain URL without the www automatically jump to the www domain name, you can IIS Web server in accomplishes this by URL rewrite module, only need 301 permanent redirect can be achieved without the www request links automatically jump www host domain name.

Host domain name (1) the first step is the host domain name with www and without www resolution needs to be able successfully to access, involving the relevant domain name resolution to resolve operating platform and IIS website deployment operations to ensure the two domain names can be a normal visit. The recommended way to bind multiple host a website domain name in IIS, after binding effect in the following figure.

Settings can refer to the tutorial: IIS Web site at the same time how to resolve the www and non-www domain .
Here Insert Picture Description

(2) into the IIS management interface, select the corresponding site, and then select the [] to the right of the URL rewriting function area, if not this URL Rewrite Module Microsoft URL Rewrite Module. We recommend that you download the module installed in IIS.

URL rewriting module 32 system: http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi

URL rewriting module 64 system: http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi
Here Insert Picture Description

(3) into the top [URL rewriting] management interface, the first generation to enter the domain name www .htaccess online. On this site provides domain name redirection [www] functions generate the code.
Here Insert Picture Description

(4) Step 3 page copy generated code as follows
Here Insert Picture Description

(5) continue to return to step 2] [URL rewrite module, enter the URL rewrite [] interface, click on the right side of the import rule [].
Here Insert Picture Description

(6) introduced into the page [rule], the fourth step of copying the code rewrite rules paste to [] input box, and the top right corner of the [applications].

Here Insert Picture Description

(7) and then restart the Web site in IIS, the configuration take effect, this time without the www URLs will automatically jump to the www.

(8) If the implementation of the above requirements, but also need to add the http requests automatically jump https secure connections, we can once again set the URL rewrite rules to implement (the premise is already configured https secure connection sites with SSL certificates) the specific setting method can refer to: IIS Web site link to jump directly to set Http Https secure connection .

Note: The text reproduced bloggers personal station IT technology small fun house , the original link for the IIS Web site configuration without the www domain name to jump directly domain _IT technology small house with interest the www .

Guess you like

Origin blog.csdn.net/weixin_39650424/article/details/93380391