在我想要返回的基本url上,403访问被拒绝,我该怎么做?
根据您的需求,您可以利用以下url重写规则:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Block the request from the root url and return 403" stopProcessing="true">
<match url="^$" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied."/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
此外,您还可以删除
index.html
文档位于
Application settings > Default documents
如下所示: