簡體   English   中英

IIS ARR重寫URL路徑作為查詢字符串參數

[英]IIS ARR Rewrite URL Path as Query String Parameter

我想轉換,

http:// domain / something / another?param1 = value1

http:// domain /?paramz = something&paramy = another&param1 = value1

在Azure中使用ARR IISLB。

此規則應為您工作:

<rule name="ARR Rewrite" stopProcessing="true">
   <match url="([^/]+)/?([^/]+)?/?" />
    <conditions>
        <add input="{QUERY_STRING}" pattern="param1=" />
    </conditions>
   <action type="Rewrite" url="/?paramz={R:1}&amp;paramy={R:2}" appendQueryString="true" />                   
 </rule>

它正在檢查URL是否具有兩個段( /something/another ),並且查詢字符串在查詢字符串中具有參數param1 ,然后根據需要進行重寫

暫無
暫無

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

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