Intelligencia.UrlRewriter可以在IIS7中工作吗? [英] Can Intelligencia.UrlRewriter be made to work in IIS7?

查看:112
本文介绍了Intelligencia.UrlRewriter可以在IIS7中工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们继承了一个使用Intelligencia.UrlRewriter模块的应用程序。我们的环境虽然是IIS7。我们已经将我们的网站设置为在经典的asp.net应用程序池中运行(它可以解决很多这类问题)。但是我们仍然没有看到我们应用中的网址被重写。

We've inherited an application that uses the Intelligencia.UrlRewriter module. Our environment though is IIS7. We've already set our site to run in the classic asp.net application pool (which aparantly works for a lot of these kinds of problems). However we're still not seeing the URLs in our app be rewritten.

有没有人碰到这个?

推荐答案

您需要在system.webServer元素上定义配置,例如:

You need to define the config on the system.webServer element, like:

    <system.webServer>
         <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
  <add name="UrlRewriter" 
   type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
        </modules>
    </system.webServer>

您可以保留两个配置。你现在可能拥有的是:

You can keep both config. What you probably have now is:

<httpModules>
      <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
        </httpModules>

检查 http://learn.iis.net/page.aspx/243/aspnet-integration -with-iis7 /

ps。我一直在使用它,只要该配置在。

ps. I have been using it with no trouble at all, as long as that config is in.

更新1:同时检查 http://weblogs.asp .net / scottgu / archive / 2007/02/26 / tip-trick-url-rewriting-with-asp-net.aspx ,特别是方法3:使用HttpModule通过IIS7执行无扩展URL重写,因为我添加的配置具有无扩展配置。

Update 1: Also check http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx, particularly "Approach 3: Using an HttpModule to Perform Extension-Less URL Rewriting with IIS7", since the config I added has the extension-less config.

这篇关于Intelligencia.UrlRewriter可以在IIS7中工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆