小弟我在VS2008中用C# asp.net写了一个程序,里面有 Url Rewrite 进行地址重写,在VS中调试好用,可是我把程序发布到iss中时就不好用了,请大家帮帮忙。小弟谢过了。

解决方案 »

  1.   

    路径问题,你把你配置的url贴出来!
      

  2.   

    估计是没有在iis里映射后缀。
    用vs进行调试的时候,所有的 请求 都会被提交到clr进行处理的。
      

  3.   

    这是我在web.config中写的
    <rewrite url="~/index/index.html" to="~/index/default.aspx" />    
        <rewrite url="~/index/news.html" to="CompnayNews.aspx?NewsClassID=0" />
        <rewrite url="~/index/news-(.+).html" to="CompnayNews.aspx?NewsClassID=$1"/>
        <rewrite url="~/index/ShowNews-(.+).html" to="ShowNews.aspx?NewsID=$1"/>    
        <rewrite url="~/index/Warning.html" to="Warning.aspx?From=navigator&amp;WarningClassID=0" />
        <rewrite url="~/index/Warning-(.+).html" to="Warning.aspx?From=left&amp;WarningClassID=$1" />
         <rewrite url="~/index/ShowWarning-(.+).html" to="ShowWarning.aspx?ID=$1" />
    而放程 序放到IIs中就提示找不到页的错误。
    而在VS中测试就能访问。
      

  4.   

    你测试访问的是不是index.html页面吧?