/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
解决方案 »
- 请问一下.net的复习步骤,迷茫期中~~~~
- 关于checkbox被选择后,操纵文本框textfield的问题
- “/”应用程序中的服务器错误。急急急!
- 请教两个简单问题?取字符和正则表达式,在线等
- 入门问题
- vs2008中TreeView中的复选框如何只让选中一个,并且还要得到其值
- 在SQL2000中的查询分析器中可以建新数据库吗???
- 项目差一功能完工,寻一个再线找回密码的程序(最好是C#的)!多谢!
- 我想用JAVASCRIPT读取DROPDOWNLIST的TEXT 和VALUE
- 实际开发中有关数据操作的问题三
- 哪位大侠知道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