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

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

问题描述

我们继承了一个使用 Intelligencia.UrlRewriter 模块的应用程序.我们的环境虽然是IIS7.我们已经将我们的站点设置为在经典的 asp.net 应用程序池中运行(这显然适用于许多此类问题).但是,我们仍然没有看到我们应用中的 URL 被重写.

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.

有人遇到过这种情况吗?

Has anyone run into this?

推荐答案

您需要在 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天全站免登陆