如题,我下载了URLRewriter.rar并解压放到了bin文件夹下
web.config里添加了如下字节
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections><RewriterConfig>
    <Rutes>
      <RewriterRule>
        <LookFor>~/news/(.[0-9]*).html</LookFor>
        <SendTo>~/news/newsDetail.aspx?id=$1</SendTo>
      </RewriterRule>
    </Rutes>
  </RewriterConfig>
<httpHandlers>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>然后iis也配置里也添加了.html映射,跟.aspx的是一样的,而且要求检查文件是否存在这项也没打勾勾,为什么我打开网址:http://localhost/news/123.html就提示无法找到该页面呢????http://localhost/news/newsDetail.aspx?id=123这个是可以正常访问的,
是不是根本起作用啊?????????

解决方案 »

  1.   

    http://apps.hi.baidu.com/share/detail/7575533
      

  2.   

    <Rutes>
      <RewriterRule>
      <LookFor>~/news/(.[0-9]*).html</LookFor>
      <SendTo>~/news/newsDetail.aspx?id=$1</SendTo>
      </RewriterRule>
      </Rutes>
    是Rules,拼错了 
     
     
     
    ----------------------------------签----------名----------栏----------------------------------
      

  3.   


    如果不是上面个错误可以参考一下下面的方式进行url重写http://www.cnblogs.com/zhongweiv/archive/2011/11/02/UrlRewriter.htmlhttp://www.cnblogs.com/zhongweiv/archive/2011/11/02/UrlRewriter_IIS.html