301 redirect not working in IIS 7

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 07:39:55

Ok, I created another rule which works:

<rule name="Asp classic legacy 301 redirect">  
  <match url="blog/item\.asp$" />  
    <conditions>  
      <add input="{QUERY_STRING}" pattern="n=(\d+)" />  
    </conditions>  
    <action type="Redirect" url="blog/item/{C:1}" redirectType="Permanent" appendQueryString="false"/>  
</rule> 

Still wondering why would Url rewriting module generates rules which don't work?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!