在IIS 7.5 URL重写会导致内部服务器错误 [英] Url Rewrite in IIS 7.5 causes Internal server error
问题描述
我有一个Web应用程序运行@ Windows 2008 R2上,ASP.NET v4.0的。
我安装URL重写模块,并开始使用它,如在正式的例子。
我的问题启动时,<改写> system.webServer> $ C
标记下的℃加入到web.config $ C> - 事实上,当我尝试浏览任何网页这个当前的应用程序下,我得到
500 - 内部服务器错误
这是<&改写GT;
块我一直在增加:
< system.webServer>
<&改写GT;
<规则与GT;
<规则名称=测试1>
<匹配URL =^缺省的/([0-9] +)/([_ 0-9A-Z - ] +)/>
<作用TYPE =重写URL =Default.aspx的编号= {R:1}&放大器;放大器;标题= {R:2}?/>
< /规则>
< /规则>
< /重写>
< /system.webServer>
刚刚有了同样的错误,并找到了解决。您需要安装该模块为IIS的URL重写。你可以在这里下载中心吧: http://www.iis.net/download/URLRewrite
干杯,
I have a web application runs @ Windows 2008 R2, ASP.NET v4.0.
I installed the Url Rewrite Module, and started to use it as shown in the official examples.
My problem starts when the <rewrite>
tag is added to the web.config under <system.webServer>
- actually when I try to browse to any page under this current application, I get 500 - Internal server error
.
This is the <rewrite>
block I've been adding:
<system.webServer>
<rewrite>
<rules>
<rule name="test1">
<match url="^default/([0-9]+)/([_0-9a-z-]+)" />
<action type="Rewrite" url="default.aspx?id={R:1}&title={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
Just had same error and found a fix. You need to install the module for IIS for URL rewrite. you can dowload it here: http://www.iis.net/download/URLRewrite
Cheers,
这篇关于在IIS 7.5 URL重写会导致内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!