使用URL重写模块,我有被定义的规则设置为:IIS URL重写
Matches the pattern
Regular Expressions
Pattern: /support/viewmessages.aspx
Ignore Case: true
Action Type: Redirect
Redirect URL: http://newdomain/support/viewmessages.aspx
Append Query String: true
Redirect Type: 301
这听起来好像它应该重定向任何URL的格式化,如:
http://olddomain/support/viewmessages.aspx?forum=20&topic=75942&ForumName=General%20Discussion
成为:
http://newdomain/support/viewmessages.aspx?forum=20&topic=75942&ForumName=General%20Discussion
但是,似乎没有任何事情发生。我在旧域上获得了我的404,并且它不会追加到查询字符串的404上。
下面是IIS在我的web.config生成的代码:
<rule name="Forum Posts" patternSyntax="ECMAScript" stopProcessing="true">
<match url="/support/viewmessages.aspx" />
<action type="Redirect" url="http://newdomain/support/viewmessages.aspx" appendQueryString="true" />
</rule>
任何帮助,将不胜感激。
听起来好像这是沿着serverfault问题的线条更。 “编程”在哪里? – 2012-04-12 19:26:47