使用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