请教MS 的UrlRewrite配置的正则表达式怎么写 60
rt,比如说:我请求的地址是www.xx.com/archive/20100102/lucy/怎么能重定向到www.xx.com/archive?id=20100102&...
rt,比如说:我请求的地址是 www.xx.com/archive/20100102/lucy/怎么能重定向到 www.xx.com/archive?id=20100102&author=lucy
本人在线急等 展开
本人在线急等 展开
展开全部
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- RUL重写开始 -->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<!--地址重写规则-->
<!--首页,定位到静态页面-->
<RewriterRule>
<Type>Static</Type>
<LookFor>~/archive/(20100102)/(lucy)/</LookFor>
<SendTo>~/archive?id=$1&author=$2</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!-- RUL重写结束 -->
</configuration>
</xml>
<configuration>
<!-- RUL重写开始 -->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<!--地址重写规则-->
<!--首页,定位到静态页面-->
<RewriterRule>
<Type>Static</Type>
<LookFor>~/archive/(20100102)/(lucy)/</LookFor>
<SendTo>~/archive?id=$1&author=$2</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!-- RUL重写结束 -->
</configuration>
</xml>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询