/Corporation/Templates/index.aspx?ID=783
/Corporation/Templates/index/783.html RewriteRule /Corporation/Templates/index/\d{1,})\.html /Corporation/Templates/index.aspx?ID=$1
/Corporation/Templates/index/783.html RewriteRule /Corporation/Templates/index/\d{1,})\.html /Corporation/Templates/index.aspx?ID=$1
解决方案 »
- 菜鸟求救!还是web.config的问题
- sql的问题
- 在调试的过程中怎样跳过js代码的错误
- 从2个有关键字相连的表中取出不同的数据 存入到另外一个表中 用SQL语句如何实现
- 这里一连串有规律的int[]类型的数组?如何访问它们?
- 怎样实现把一个表中ID相同的条目合并到一行
- 求日历控件
- 如何在程序中动态加载图片到picturebox中?
- 回复就有分,救命呀!水晶报表的问题!关于报表的打印和导出问题,怎么自己定义报表Toolbar上的各种控件的方法,请大家帮忙了,谢谢!在线等
- 环境:VS2005,关于FreeTextBox的问题,其它可以正常使用,就是“插入图片”“插入表格”出现如下提示,
- 哪位大侠知道vs 2005的环境变量怎么设置啊?
- 寻求帮助--学校管理asp源代码
是什么意思
@"([\?&][^\d]+)([\d]+)";
用这个正则
然后replace时替换成这个"/$2.html"
最后如果是
如果是两个以上参数,则需要再写个正则...
或者执行完这个再replace一遍
我的资源里有下载.
有需的话,我可以写对应的正则给你.
http://www.vcsale.com/service.World_of_Warcraft_EU.8.aspx
实际地址是:
http://www.vcsale.com/serviceselect.aspx?gameid=8
改写成
http://www.aaa.com/Corporation/Templates/index/783.html ----------------------------------
<RewriterRule>
<LookFor>~/Corporation/Corporation/index/(\d{1,8})\.html</LookFor>
<SendTo>~/www.aaa.com/Corporation/Templates/index.aspx?ID=$1</SendTo>
</RewriterRule>
----------------------------------http://www.aaa.com/Training/Detail.aspx?ID=81&PID=156
改写成
http://www.aaa.com/Training/Detail/81_156.html ----------------------------------
<RewriterRule>
<LookFor>~/Training/Detail/(\d{1,8})_(\d{1,8})\.html</LookFor>
<SendTo>~/www.aaa.com/Training/detail.aspx?ID=$1&PID=156</SendTo>
</RewriterRule>
----------------------------------
http://www.aaa.com/tutor/detail.aspx?ID=209
改写成
http://www.aaa.com/tutor/detail/209.html
----------------------------------
<RewriterRule>
<LookFor>~/tutor/Detail/(\d{1,8})\.html</LookFor>
<SendTo>~/www.aaa.com/tutor/detail.aspx?ID=$1
</RewriterRule>
----------------------------------http://www.aaa.com/shop/Shop-pro.aspx?productID=2536
改写成
http://www.aaa.com/shop/Shop-pro/2536.html ----------------------------------
<RewriterRule>
<LookFor>~/shop/shop-pro/(\d{1,8})\.html</LookFor>
<SendTo>~/shop/Shop-pro.aspx?productID=$1
</RewriterRule>
----------------------------------试试看..比较容易理解的
happy
欢迎大家来群里聊聊天....学习,,,研究....C# / .Net 7729746 交流社团 聊技术,项目合作。Blogs http://zhoufleru.cnblogs.com
正则如下:
http://\S+/\w+\S+?\.aspx\?((ID=\d+\&PID=\d+)|(ID=\d+)|(productID=\d+))
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^/httpd(?:\.ini|\.parse\.errors).* [F,I,O]
RewriteRule /content/(\d+)\.html /content\.asp\?sort=$1 [N,I]
#下面是新增加的规则#/Corporation/Templates/index/783.html ==>/Corporation/Templates/index.aspx?ID=783
RewriteRule /Corporation/Templates/index/(\d+)\.html /Corporation/Templates/index\.aspx\?ID=$1#/Training/Detail/81_156.html ==>/Training/Detail.aspx?ID=81&PID=156
RewriteRule /Training/Detail/(\d+)_(\d+)\.html /Training/Detail\.aspx\?ID=$1&PID=$2#/tutor/detail/209.html ==>/tutor/detail.aspx?ID=209
RewriteRule /tutor/detail/(\d+)\.html /tutor/detail\.aspx\?ID=$1#/shop/Shop-pro/2536.html ==>/shop/Shop-pro.aspx?productID=2536
RewriteRule /shop/Shop-pro/(\d+)\.html /shop/Shop-pro\.aspx\?productID=$1
改写成
http://www.kh-audio.com/e-product_electronics.htmlhttp://www.kh-audio.com/e-product.asp?producttype=Amplifier%20Kits
改写成
http://www.kh-audio.com/e-product_amp.htmlhttp://www.kh-audio.com/e-productinfo.asp?id=1330
改写成:
http://www.kh-audio.com/e-productinfo_1330.htmlhttpd.ini中默认内容如下 [ISAPI_Rewrite]# 3600 = 1 hour
CacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP