日期:2014-05-19  浏览次数:20641 次

各位高手想问个URL重写的问题.在线等
系统是XP的..我在IIS中的ISAPI筛选器中加了aspnet_isapi..
在bin中引用了URLRewriter.dll跟ActionlessForm.dll
web.config中是这样子写的.
<configuration>
   
    <configSections>
        <section   name= "RewriterConfig "   type= "URLRewriter.Config.RewriterConfigSerializerSectionHandler,   URLRewriter "   />
    </configSections>
    <RewriterConfig>
        <Rules>
            <RewriterRule>
                <LookFor> list-(\d).aspx </LookFor>
                <SendTo> list.aspx?id=$2 </SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor> class-(\d).aspx </LookFor>
                <SendTo> calss.aspx?id=$2 </SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor> Default.aspx </LookFor>
                <SendTo> Default.asp </SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor> Flist-(\d).aspx </LookFor>
                <SednTo> Flist.aspx?id=$2 </SednTo>
            </RewriterRule>
        </Rules>
    </RewriterConfig>
    <appSettings>
        <add   key= "ConnectionString "   value= "Data   Source=.;Initial   Catalog=shop;Uid=sa;pwd=19850914; "/>
    </appSettings>
<httpHandlers>  
  <system.web>
            <add   verb= "* "   path= "*.aspx "   type= "URLRewriter.RewriterFactoryHandler,   URLRewriter "   />
        </httpHandlers>
    </system.web>
不知道哪里还要作修改的?哪里写错了?网上找的那些我都看过了.我也按他们的作过了.可就是不行..请问为什么??
在线等...

------解决方案--------------------
http://www.jeast.net/student/guijishu/archives/2006/2432.html
可能您的webconfig没有配置好,这个其实网上很多的,你查一下就可以了,没什么难度在
------解决方案--------------------
<?xml version= "1.0 "?> <!--
注意: 除了手动编辑此文件以外,您还可以使用
Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
“网站”-> “Asp.Net 配置”选项。
设置和注释的完整列表在
machine.config.comments 中,该文件通常位于
\Windows\Microsoft.Net\Framework\v2.x\Config 中
--> <configuration>
<configSections>
<!-- The <configSections> element must contain a <section> tag for the <RewriterConfig> section element.
The type of the section handler is RewriterConfigSerializerSectionHandler, which is responsible for
deserializing the <RewriterConfig&g