IIS Url Rewriter 用于检测 feed 并重定向到 Feedburner
我的网站在 http://mysite.com/sydnication/rss/articles
路径中生成 rss 提要。我想在所有用户访问此 url 时将其重定向到 feedburner,除非 feedburner 自己的用户代理尝试访问此 url。这是我认为应该有效的 Url Rewrite 规则,但事实并非如此。有人可以看一下并告诉我出了什么问题吗?
<rule name="Feedburner redirection" enabled="true" stopProcessing="true">
<match url="/syndication/rss/articles" />
<action type="Redirect" url="http://feeds.feedburner.com/articles" appendQueryString="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_USER_AGENT}" pattern="FeedBurner" negate="true" />
</conditions>
</rule>
My site generates its rss feed in http://mysite.com/sydnication/rss/articles
path. I want to redirect all users to feedburner when they access this url except for when feed burner's own user agent tries to access this url. This is the Url Rewrite rule that I thought should work, but it doesn't. Can some one take a look and tell me what's wrong?
<rule name="Feedburner redirection" enabled="true" stopProcessing="true">
<match url="/syndication/rss/articles" />
<action type="Redirect" url="http://feeds.feedburner.com/articles" appendQueryString="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_USER_AGENT}" pattern="FeedBurner" negate="true" />
</conditions>
</rule>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试从匹配网址中删除第一个正斜杠 (/),匹配的输入开头没有斜杠,以防万一我会添加
ignoreCase="true"
Try to remove first forward slash (/) from match url, the input for match hasn't got slash at the beginning, and just in case I would add
ignoreCase="true"