IIS URL Rewrite Module的防盜鏈規則設置


IIS版本:IIS 7.5

URL Rewrite組件:IIS URL Rewrite Module(http://www.iis.net/downloads/microsoft/url-rewrite

規則定義截圖:

 

Web.config中的規則定義:

<rewrite>
    <rules>
        <rule name="RequestBlockingRule1" enabled="true" stopProcessing="true">
            <match url=".*" />
            <conditions>
                <add input="{HTTP_REFERER}" pattern="^$" negate="true" />
                <add input="{HTTP_REFERER}" pattern="^http://(.*\.)?(cnblogs\.com)/.*$" negate="true" />
            </conditions>
            <action type="CustomResponse" statusCode="404" />
        </rule>
    </rules>
</rewrite>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM