简体   繁体   English

URLRewrite IIS 7需要帮助

[英]URLRewrite IIS 7 Help Needed

Here is my settings for IIS 7 URL Rewrite: 这是我对IIS 7 URL重写的设置:

<system.webServer>
    <rewrite>
      <rules>
        <rule name="Rewrite to article.aspx">
          <match url="^Articles/([0-9]+)/([_0-9a-z-]+)" />
          <action type="Rewrite" url="articledetails.aspx?articleid={R:1}&amp;title={R:2}" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>

Unfortunately, my page at the following url is not displayed at all: 不幸的是,我位于以下网址的页面根本没有显示:

http://www.highoncoding.com/Articles/723_Introduction_to_IPhone_Development.aspx http://www.highoncoding.com/Articles/723_Introduction_to_IPhone_Development.aspx

Looks like you are giving in the wrong URL. 看起来您输入的URL错误。

<match url="^Articles/([0-9]+)/([_0-9a-z-]+)" />

The above rule will match /Articles/723/Introduction_to_Iphone_Development . 上面的规则将匹配/Articles/723/Introduction_to_Iphone_Development You are giving it /Articles/723_Introduction_to_Iphone_Development (underscore instead of slash). 您正在给它/Articles/723_Introduction_to_Iphone_Development (下划线而不是斜杠)。 Seems that you fixed it as I am typing this though :) 似乎您在我输入此内容时已将其修复:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM