日期:2014-05-18  浏览次数:20468 次

求url重写的正则
输入
http://localhost:2009/photo/1
转到http://localhost:2009/Photo.aspx?id=1

------解决方案--------------------
<RewriterRule>
<LookFor>~/photo/(\d+)</LookFor>
<SendTo>~/Photo.aspx?id=$1</SendTo>
</RewriterRule>
------解决方案--------------------
<LookFor>~/photo/(\d+)</LookFor>
<SendTo><![CDATA[~/photo.aspx?id=$1]]></SendTo>
------解决方案--------------------

<RewriterRule> 
<LookFor>~/(\d+) </LookFor> 
<SendTo>~/Photo.aspx?id=$1 </SendTo> 
</RewriterRule>

------解决方案--------------------
<LookFor>~/(\d+) </LookFor> 
<SendTo> <![CDATA[~/photo.aspx?id=$1]]> </SendTo>