问题
I am trying to rewrite the URL on an Azure MVC application. The solution contains many projects, thus has web.config files all over the place.
The URL Rewrite objective is to send all URLs based on the Project "Statistics" to the subdomain "admin", whatever subdomain was called at the origin of the request. (I created this rule independently on my laptop with IIS Manager and imported it manually in one of the projects)
<configuration>
<system.webServer>
<!--Something here. The rule nests at the end of the block. -->
<rewrite>
<rules>
<rule name="Statistics">
<match url="[0-9a-zA-Z-]*.mysite.com/statistics/(.*)" />
<action type="Rewrite" url="https://admin.mysite.com/statistics/{R:1}" />
</rule>
</rules>
</rewrite>
</configuration>
</system.webServer>
So, I am wondering why this rule doesn't seem to be executed:
Is the syntax correct?
In which web.config file should I place this rule, considering that I have five projects in the Solution?
来源:https://stackoverflow.com/questions/53015347/url-rewrite-not-executed-on-azure-several-projects