当前位置:编程学习 > C#/ASP.NET >>

急~~~~~ASP.NET URL重写问题!

下载这个文件http://www.sfengs.com/download/URLRewriter.rar,解压到工程中的bin文件夹中,并在web.config中配置一下
web.config里设置如下:
<configuration>
    <configSections>
        <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
    </configSections>
    <RewriterConfig>
        <Rules>
            <RewriterRule>
                <LookFor>~/d(\d+)\.aspx</LookFor>
                <SendTo>~/xxym?id=$1</SendTo>
            </RewriterRule>
        </Rules>
    </RewriterConfig>
    <system.web>
        <httpHandlers>
            <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
        </httpHandlers>
    </system.web>
</configuration>
 但是运行是还是老样子,没反应,还是显示http://localhost/wjtym/xxym.aspx?id=101
我用的是asp.net 1.1版本的!
请问为什么会没反应的呢?
各位高手帮帮忙啊~~~~~ --------------------编程问答-------------------- http://www.cnblogs.com/zhuawang/archive/2007/04/07/704267.html
照着做肯定没错的 --------------------编程问答-------------------- 应该是你理解反了,http://localhost/wjtym/xxym.aspx?id=101这个是实际的地址,不是访问时的地址。 --------------------编程问答-------------------- 站点有没有配置 --------------------编程问答-------------------- 看来URL重写还是许多人关注的重点。
请看:http://www.xproer.com/web/article/data.aspx?aid=169&cid=14&aname=Url%u91CD%u5B9A%u6280%u672F%u8BB2%u89E3&atime=2007-4-19 9:24:50&alook=15&author=Xproer

我只讲了两个重要的对象,希望你能理解。 --------------------编程问答-------------------- 如果内容没有显示完整,请刷新一下页面。
--------------------编程问答-------------------- <form runat="server"></from>要重写
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,