2012-07-19 79 views
0

我們有一個非常簡單的URL重寫規則,基本上使301重定向到另一個域:IIS URL重寫模塊unencoding查詢字符串

<rewrite> 
    <rule> 
    <match url="^(default.aspx)?$" /> 
    <action type="Redirect" url="https://some.other.domain.com" /> 
    </rule> 
</rewrite> 

不幸的是,當遇到這樣的URL:

http://original.domain.com/?returnUrl=https%3A%2F%2Fsome.url%2F

重定向URL看起來是這樣的:

https://some.other.domain.com/?returnUrl=https://some.url/

通知的URL編碼是如何丟失的。

這是URL重寫模塊中的錯誤嗎?如果是這樣,一個人怎麼解決它?

回答

0

我想通了。重寫規則僅指定了部分重定向URL。查詢字符串編碼現保存現在,我改變了這一點:

<action type="Redirect" url="https://some.other.domain.com"/> 

...這樣的:

<action type="Redirect" url="https://some.other.domain.com/"/> 

(注意結尾的斜槓)