Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 将Url重定向到新Url,忽略web.config中的参数_Asp.net_Redirect_Iis_Web Config - Fatal编程技术网

Asp.net 将Url重定向到新Url,忽略web.config中的参数

Asp.net 将Url重定向到新Url,忽略web.config中的参数,asp.net,redirect,iis,web-config,Asp.net,Redirect,Iis,Web Config,我想将我的旧url(../Galary.aspx?cat=10)重定向到新url(../jacket style gallery),但它附加了旧参数 <rule name="rule9" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{QUERY_STRING}" pattern="cat=10" /> </conditi

我想将我的旧url(../Galary.aspx?cat=10)重定向到新url(../jacket style gallery),但它附加了旧参数

<rule name="rule9" stopProcessing="true">
  <match url="(.*)" /> 
  <conditions>  
    <add input="{QUERY_STRING}" pattern="cat=10" />  
  </conditions>  
  <action type="Redirect" url="./jacket-style-gallery" appendQueryString="false"/>
</rule> 


因此,如果您只想
Galary.aspx

要重定向,则应使用:

<rule name="rule9" stopProcessing="true">
  <match url="Galary.aspx" /> 
  <conditions>  
    <add input="{QUERY_STRING}" pattern="cat=10" />  
  </conditions>  
  <action type="Redirect" url="./jacket-style-gallery" appendQueryString="false"/>
</rule> 

我刚刚在我的服务器上进行了测试,它可以正常工作