簡體   English   中英

IIS Web.Config 301重定向查詢字符串參數(?)

[英]IIS Web.Config 301 Redirect on Query String Parameter (?)

    <rule name="blog" stopProcessing="true">
      <match url="en/blog.aspx?Id=9" />
      <action type="Redirect" url="http://www.mynewurl.com" redirectType="Permanent" />
    </rule>

我可以重定向“en / blog.aspx”,但我無法僅重定向“en / blog.aspx?Id = 9”。

有任何想法嗎?

終於找到了解決方案:

/en/blog.aspx?Id=9將重定向到http://www.newurl.com

    <rule name="blog" stopProcessing="true">
      <match url="en/blog.aspx$" />
      <conditions>  
        <add input="{QUERY_STRING}" pattern="Id=9" />  
    </conditions>  
      <action type="Redirect" url="http://www.newurl.com" redirectType="Permanent" />
    </rule>

在此處找到解決方案: 301重定向在IIS 7中不起作用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM