Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
When you have multiple domain names and have only one Azure website, you can use IIS URL Rewrite to host multiple domains. What do you need? At least one Windows Azure website in shared mode.
Add you domain names to this Windows Azure website. This is not possible when you use the free Windows Azure websites.
The following folder structure we need, every domain has his own folder:
Add to the root folder the file web.config and add the following xml:
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="domain1.com" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?domain1.(com|nl)" />
<add input="{PATH_INFO}" pattern="^/domain1/" negate="true" />
</conditions>
<action type="Rewrite" url="\domain1\{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
In this example we use the IIS rewrite rules to manage the requests for www.domain1.com and www.domain1.nl and forward this to the subfolder domain1. Add as many domains and rules you like.
Need more information about IIS Rewite, please go to Scott Forsyth's Blog.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in