[英]aspx dynamic data redirect
好的,我有一個在iis-7.5上運行的.net站點,並且我的表單是從數據庫內容構建的。 我們建立了一個表格,並附加了答案,並且想要替換表格但不刪除舊表格,所以我們創建了一個新表格,現在我的問題是我在將用戶從該表格重定向到新表格時遇到問題。 這是我在web.config文件中所擁有的。 並嘗試根據{QUERY_STRING}
進行重定向,但這無法正常工作,舊的URL仍處於活動狀態。 任何幫助,將不勝感激
<rewrite>
<rules>
<rule name="Redirect" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^http://www.oursite.com/service/ReportData\.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^header=1393$" />
</conditions>
<action type="Redirect" url="http://www.oursite.com/service/ReportData.aspx?header=1395{R:0}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
編輯2:
好的,這就是我所做的,並且效果很好。
我從等式中刪除了域,並添加了redirectType="Found"
因此,基本上,您必須使用文件夾來進行{QUERY_STRING}
的重定向
<rules>
<rule name="Redirect" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^service/ReportData\.aspx$" />
<action type="Redirect" url="service/ReportData.aspx?header=1395" appendQueryString="false" redirectType="Found" />
<conditions>
<add input="{QUERY_STRING}" pattern="^header=1393$" />
</conditions>
</rule>
好的,這就是我所做的,並且效果很好。
我從等式中刪除了域,並添加了redirectType =“ Found”,因此,基本上,您必須使用文件夾來進行{QUERY_STRING}的重定向
<rules>
<rule name="Redirect" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^service/ReportData\.aspx$" />
<action type="Redirect" url="service/ReportData.aspx?header=1395" appendQueryString="false" redirectType="Found" />
<conditions>
<add input="{QUERY_STRING}" pattern="^header=1393$" />
</conditions>
</rule>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.