我在用户可以在子域上创建自己的网站的站点上设置了 URL 重写。
<rule name="CName to URL - Rewrite" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(?!www)(.*)\.basedomain\.com" />
</conditions>
<action type="Rewrite" url="render_page.aspx?site={C:1}&page={R:0}" />
</rule>
例如,用户可以创建一个页面http://client.basedomain.com/about-us,这将成功地将“client”和“about-us”传递给我的应用程序。
我需要做的是在特定页面名称跟随其域的情况下覆盖此行为。
所以如果页面http://client.basedomain.com/restricted被访问了,就不会进行上面的重写,而是重写到url "render_page_restricted.aspx?site={C:1}
任何帮助是极大的赞赏。