我使用的是微软的dll
在webconfig里是这样设置的
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Group/(.*).aspx</LookFor>
<SendTo>~/Group/GroupInfo.aspx?GroupID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig><httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>问题是
我输入http://xxx.com/Group/17.aspx是可以重写到
http://xxx.com/Group/GroupInfo?GroupID=17
但是我点Group目录下别的页面时都会报错,不知道为什么
在webconfig里是这样设置的
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Group/(.*).aspx</LookFor>
<SendTo>~/Group/GroupInfo.aspx?GroupID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig><httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>问题是
我输入http://xxx.com/Group/17.aspx是可以重写到
http://xxx.com/Group/GroupInfo?GroupID=17
但是我点Group目录下别的页面时都会报错,不知道为什么
解决方案 »
- 如何计算文本的大小
- C# 如何将数据转换成xml格式,然后输出到文本文档中
- 打包后快捷方式图标的问题
- socket 使用streamReader 为什么读取不到任何值 程序执行到这里就停止了
- 新手求助!在线等!我想在应用程序中动态生成多个checkbox控件,谢谢
- 对在sqlserver数据库中两个数据库操作,事务能跨连个连接吗?怎么写?
- 制造业,进销存,先进先出的问题!
- 命名空间如何引用啊??急,在线等!
- msdn真难用,不如javaDoc,都找不到对象属于哪个库。c#不如vb,倾分相赠45
- 求助:C# 用OleDb读取Excel内容不全??
- C#调用c++函数,wchar数组处理问题,不是wchar指针
- 请教一排序算法
<LookFor>~/Group/(.*).aspx</LookFor>
<SendTo>~/Group/GroupInfo.aspx?GroupID=$1</SendTo>
在点击Group目录下的其他页面,会不会出什么问题
<LookFor>~/Group/(\d+?).aspx</LookFor>
<LookFor>~/Group/(\d+?).aspx</LookFor>
________________________
请问这个正则是啥意思啊,我不大懂正则
按你的方法就可以了,谢谢,
顺便问一下,重写了之后,如果在当前页面有提交的话,地址栏的url又回到去了,怎么能保持状态呢