好的,我有一个运行在iis-7.5上的.net站点,我的表单是从数据库内容构建的。我们已经构建了一个表单,并附加了答案,并且希望替换该表单,但不删除旧的表单,因此我们创建了一个新表单,现在我的问题是,我有一个问题,将用户从该表单重定向到新表单。下面是我在web.config文件中的内容。并试图基于{QUERY_STRING}重定向,但这并不是seam的工作,旧的网址仍然是活动的。如能提供任何帮助,将不胜感激。
<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>发布于 2015-09-14 16:16:48
好的,这是我所做的,而且效果很好。
我从等式中删除了域,并添加了redirectType=“找到”,因此基本上您必须使用文件夹进行重定向,并使用{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>https://stackoverflow.com/questions/32552732
复制相似问题