ユーザーがサブドメインで独自のサイトを作成できるサイトで、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にアクセスした場合、上記の書き換えは実行されず、代わりに「render_page_restricted.aspx?site={C:1}」という URL に書き換えられます。
どんな助けでも大歓迎です。