I have a Sitecore 8 application hosted in Azure. I have several domains subdomains that point to the same application but are deprecated and need to redirect to the main site. My main site is www.mysite.com. I have separate endpoints for each subdomain, such as www.mysite-nl.com with the endpoint hostname mysite-prod-01-cd-nl.azureedge.net. I have the following rewrite in my web.config, but it's not redirecting:
<rule name="nl redirect" stopProcessing="true">
<match url="(.*)" />
<action type="Redirect" url="http:// www.mysite.com" redirectType="Permanent"/>
<conditions>
<add input="{HTTP_HOST}" pattern="^(www\.)?mysite-prod-01-cd-nl.azureedge.net$" />
</conditions>
</rule>