Home » 文章 » 电脑技术 » Sharepoint » IIS的URL Rewrite举例

IIS的URL Rewrite举例

IIS的URL Rewrite举例

举例若想访客禁止访问域名下的DocLib6/Forms地址及其子地址,且只在指定域名作限制,则代码如下:

<rewrite>
<rules>
<rule name=”RewriteUserFriendlyURL1″ stopProcessing=”true”>
<match url=”^DocLib6/Forms(.*?)$” />
<conditions logicalGrouping=”MatchAny”>
<add input=”{HTTP_HOST}” pattern=”abc1.com” />
<add input=”{HTTP_HOST}” pattern=”abc2.com” />
<add input=”{HTTP_HOST}” pattern=”abc3.com” />
<add input=”{HTTP_HOST}” pattern=”abc4.com” />
</conditions>
<action type=”AbortRequest” />
</rule>
</rules>
</rewrite>

界面设置截图如下:

QQ截图20170710180112

微信 OR 支付宝 扫描二维码
为博主 打个赏
pay_weixinpay_zhifubao
金额随意 快来“打”我呀~

Leave a Reply

Your email address will not be published. Required fields are marked *

*