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

URLRewriter.dll伪静态问题
利用URLRewriter.dll伪静态时一个页面(news.aspx)可以这样写
<RewriterConfig>
  <Rules>
  <RewriterRule>
  <LookFor>~/n_(\d+)\.html</LookFor>
  <SendTo>~/news.aspx?newsId=$1</SendTo>
  </RewriterRule>
  </Rules>
  </RewriterConfig>
但如果我还有>~/news.aspx?mId=??,和video.aspx?videoId=??我该怎样写?
注意:news.aspx一个传值是newsId,另外一个是mId
谁帮帮我,十分感谢!

------解决方案--------------------
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/n_(\d+)\.html</LookFor>
<SendTo>~/news.aspx?newsId=$1</SendTo>
</RewriterRule>

 <RewriterRule>
<LookFor>~/aaaa_(\d+)\.html</LookFor>
<SendTo>~/news.aspx?mId=$1</SendTo>
</RewriterRule>

 <RewriterRule>
<LookFor>~/bbbb_(\d+)\.html</LookFor>
<SendTo>~/video.aspx?videoId=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
------解决方案--------------------
探讨

<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/n_(\d+)\.html</LookFor>
<SendTo>~/news.aspx?newsId=$1</SendTo>
</RewriterRule>

<RewriterRule>
<LookFor>~/aaaa_(\d+)\.html</Loo……

------解决方案--------------------
探讨

谢谢各位了,但是我现在又有新问题了,当页面里面有服务器button控件时点击了button链接地址又变成了动态的了news.aspx?mId=11