Because of the need, I have been looking for the IIS7.5 second-level domain name pseudo-static setting method, but it has not been found, and some are also ASP. NET settings are finally completed through self-exploration. In fact, it is very simple. Next I will teach you how to set them step by step.
1. Domain Name settings
This is not much to mention. As we all know, it is to point "* .xxxx.com" in the domain name resolution management to the corresponding server IP address. For example, my "* .xue163.com" point to my current server IP address.
Ii. Server IIS settings
To make resolution ineffective, a default website is required without binding any domain name, such as mine:
(Click a thumbnail to view the larger image)
Then install the URL rewriting plug-in. This plug-in is provided by Microsoft and is provided by IIS. You need to install the plug-in. You can click the following link to download the plug-in: rewrite.rar has been installed. Restart the server.
Next we will start to enter the topic.
Iii. pseudo-static configuration of second-level domain names After the URL rewriting plug-in is installed, you can see in the IIS website panel:
(Click a thumbnail to view the larger image)
Click to enter the URL rewriting panel:
(Click a thumbnail to view the larger image)
Next, click "add rule" on the right and select the default "Blank rule ":
(Click a thumbnail to view the larger image)
Click "OK" to add a specific rule. Here, the second-level domain name is configured to be pseudo-static. See the description on the image:
(Click a thumbnail to view the larger image)
The most important thing is the condition. How to fill it out? click the "condition" drop-down and you will see:
(Click a thumbnail to view the larger image)
Click "add" and enter the following information:
(Click a thumbnail to view the larger image)
Xue163 \. change com to your domain name, and click "OK". Now everything is finished. Click "application" on the right to complete the first step, this step is mainly used to convert a second-level domain name to the content under the corresponding second-level domain name directory. After this rule is added, you can now test whether it is successful, for example, input: img.xue163.com, after the result is rewritten, the current address is http://img.xue163.com/img.xue163.com. Now, it's easy. Do you need the img variable? Add a rule. Follow the steps above, but this time you don't need to add any conditions, for example:
(Click a thumbnail to view the larger image)
This rule is to rewrite the address obtained in the first step. {R: 1} is the variable, which is also the prefix of the second-level domain name, this step allows you to write any rules to meet different requirements. It has been completed. What you cannot think of is the first step. How to obtain the prefix of the second-level domain name is easy to obtain, any rewrite is required. Don't friends please add my QQ: 20127430, or visit the http://www.xue163.com to view.