2013-05-15 16 views
3

我的網站正在使用POST VERB獲取DOS攻擊,我的網站是一個靜態網站,我試圖阻止主頁上的任何POST操作。中止IIS中的任何POST操作

我在我的服務器上安裝了URL Rewrite,所以我試圖編寫規則在主頁上放棄POST,但它不起作用。任何其他想法在主頁上單獨停止POST?

感謝

<rewrite> 
<rules> 
    <rule name="Remove Home Page Post"> 
    <match url="/default.aspx" /> 
     <conditions> 
      <add input="{HTTP_METHOD}" pattern="post" /> 
     </conditions> 
     <action type="AbortRequest" /> 
    </rule> 

</rules> 

+1

將'/ default.aspx'更改爲'^ default.aspx'。無論如何,您可能需要考慮使用[請求過濾](http://www.iis.net/configreference/system.webserver/security/requestfiltering)功能。 – cheesemacfly

回答

1

如果您對IIS管理員訪問權限。 運行=> inetmgr

轉到您的網站。 右鍵單擊屬性。 主目錄選項卡。 配置=>。aspx =>編輯 刪除POST

然後應用更改。