繁体   English   中英

IIS Url Rewrite减慢了网站的速度

[英]IIS Url Rewrite slows down website

我在我的web.config中使用IIS URL Rewrite 2.0来处理某些规则,因为UrlRewriting.config已过时,建议使用IIS URL Rewrite。 但是,在我的web.config中添加两个简单规则后,我的网站运行速度很慢......我正在运行Sql Server Express,所以这不是数据库问题。

<system.webServer>下的web.config中保存规则后,重新加载网页(任何页面,而不仅仅是下面显示的特定url sitemap.xml)后立即出现性能下降。

任何帮助/建议?

   <rewrite>
   <rules>
    <!-- Serve site map with proper XML content type response header. -->
    <rule name="Sitemap XML" enabled="true" stopProcessing="true">
      <match url="sitemap.xml" />
      <action type="Rewrite" url="sitemap.aspx" appendQueryString="false"/>
    </rule>
    <!-- Access block rule - is used to block all requests made to a Web site if those requests do not have the host header set. This type of rule is useful when you want to prevent hacking attempts that are made by issuing HTTP requests against the IP address of the server instead of using the host name -->
    <rule name="Fail bad requests">
      <match url=".*"/>
      <conditions>
        <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
      </conditions>
      <action type="AbortRequest" />
    </rule>
    <!-- HTTP to HTTPS Rule 
    <rule name="Redirect to https" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
      <match url="*" negate="false" />
      <conditions logicalGrouping="MatchAny">
        <add input="{HTTPS}" pattern="off" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
    </rule>-->
  </rules>
</rewrite>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM