Aspx动态数据重定向
本文关键字:重定向 数据 动态 Aspx | 更新日期: 2023-09-27 18:12:29
OK,我有一个。net网站在iis-7.5上运行,我的表单是从数据库内容构建的。我们建立了一个表单,并附上了答案,想要替换表单,但不删除旧表单,所以我们创建了一个新表单,现在我的问题是,我有一个问题,将用户从该表单重定向到新表单。这是我在网上找到的。配置文件。并试图根据{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>