Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit affd618

Browse files
committedJul 17, 2020
updated low quality images and grey borders
1 parent 88a2617 commit affd618

File tree

9 files changed

+15
-17
lines changed

9 files changed

+15
-17
lines changed
 
Loading
Loading
Loading
Loading
Loading
Loading
Loading

‎articles/application-gateway/rewrite-http-headers-url.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ To accomplish scenarios where you want to choose the backend pool based on the v
191191

192192
**Step1:** Create a path-map as shown in the image below
193193

194-
![img](./media/rewrite-http-headers-url/url-scenario1-1.png)
194+
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario1-1.png" alt-text="URL rewrite scenario 1-1.":::
195195

196196
**Step 2 (a):** Create a rewrite set which has 3 rewrite rules:
197197

@@ -201,13 +201,13 @@ To accomplish scenarios where you want to choose the backend pool based on the v
201201

202202
* The third rule has a condition that checks the *query_string* variable for *category=accessories* and has an action that rewrites the URL path to /*listing3* and has **Re-evaluate path map** enabled
203203

204-
![img](./media/rewrite-http-headers-url/url-scenario1-2.png)
204+
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario1-2.png" alt-text="URL rewrite scenario 1-2.":::
205205

206206

207207

208208
**Step 2 (b):** Associate this rewrite set with the default path of the above path-based rule
209209

210-
![img](./media/rewrite-http-headers-url/url-scenario1-3.png)
210+
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario1-3.png" alt-text="URL rewrite scenario 1-3.":::
211211

212212
Now, if the user requests *contoso.com/listing?category=any*, then it will be matched with the default path since none of the path patterns in the path map (/listing1, /listing2, /listing3) will match. Since you associated the above rewrite set with this path, this rewrite set will be evaluated. As the query string will not match the condition in any of the 3 rewrite rules in this rewrite set, no rewrite action will take place and therefore, the request will be routed unchanged to the backend associated with the default path (which is *GenericList*).
213213

@@ -223,11 +223,11 @@ In that case, Application Gateway can capture parameters from the URL and add qu
223223

224224
**Condition** - If server variable `uri_path` equals to the pattern `/(.+)/(.+)`
225225

226-
![img](./media/rewrite-http-headers-url/url-scenario2-1.png)
226+
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario2-1.png" alt-text="URL rewrite scenario 2-1.":::
227227

228228
**Action** - Set URL path to `buy.aspx` and query string to `category={var_uri_path_1}&product={var_uri_path_2}`
229229

230-
![img](./media/rewrite-http-headers-url/url-scenario2-2.png)
230+
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario2-2.png" alt-text="URL rewrite scenario 2-2.":::
231231

232232
For a step-by-step guide to achieve the scenario described above, see [Rewrite URL with Application Gateway using Azure portal](rewrite-url-portal.md)
233233

@@ -237,7 +237,7 @@ In case of URL rewrite, Application Gateway rewrites the URL before the request
237237

238238
In case of URL redirect, Application Gateway sends a redirect response to the client with the new URL. That, in turn, requires the client to resend its request to the new URL provided in the redirect. URL that user sees in the browser will update to the new URL
239239

240-
![img](./media/rewrite-http-headers-url/url-rewrite-vs-redirect.png)
240+
:::image type="content" source="./media/rewrite-http-headers-url/url-rewrite-vs-redirect.png" alt-text="Rewrite vs Redirect.":::
241241

242242
## Limitations
243243

‎articles/application-gateway/rewrite-url-portal.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In the below example whenever the request URL contains */article*, the URL path
3535

3636
3. Select **Rewrite set**:
3737

38-
![Add rewrite set](./media/rewrite-url-portal/rewrite-url-portal-1.png)
38+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-1.png" alt-text="Add rewrite set":::
3939

4040
4. Provide a name for the rewrite set and associate it with a routing rule:
4141

@@ -45,13 +45,13 @@ In the below example whenever the request URL contains */article*, the URL path
4545

4646
* Select **Next**.
4747

48-
![img](./media/rewrite-url-portal/rewrite-url-portal-2.png)
48+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-2.png" alt-text="Associate to a rule":::
4949

5050
5. Create a rewrite rule:
5151

5252
* Select **Add rewrite rule**.
5353

54-
![Add rewrite rule](./media/rewrite-url-portal/rewrite-url-portal-3.png)
54+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-3.png" alt-text="Add rewrite rule":::
5555

5656
* Enter a name for the rewrite rule in the **Rewrite rule name** box. Enter a number in the **Rule sequence** box.
5757

@@ -73,7 +73,7 @@ In the below example whenever the request URL contains */article*, the URL path
7373

7474
* Select **OK**.
7575

76-
![img](./media/rewrite-url-portal/rewrite-url-portal-4.png)
76+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-4.png" alt-text="Condition":::
7777

7878

7979

@@ -85,23 +85,21 @@ In the below example whenever the request URL contains */article*, the URL path
8585

8686
* Under **Components**, select **Both URL path and URL query string**
8787

88-
* In the **URL path value**, enter the new value of the path. In this example, we will use **/article.aspx**
89-
90-
![img](./media/rewrite-url-portal/rewrite-url-portal-5.png)
88+
* In the **URL path value**, enter the new value of the path. In this example, we will use **/article.aspx**
9189

9290
* In the **URL query string value**, enter the new value of the URL query striong. In this example, we will use **id={var_uri_path_1}&title={var_uri_path_2}**
9391

94-
**Note**: {var_uri_path_1} and {var_uri_path_1} are used to fetch the substrings captured while evaluating the condition in this expression `.*article/(.*)/(.*)`
95-
96-
![img](./media/rewrite-url-portal/rewrite-url-portal-6.png)
92+
`{var_uri_path_1}` and `{var_uri_path_1}` are used to fetch the substrings captured while evaluating the condition in this expression `.*article/(.*)/(.*)`
9793

9894
* Select **OK**.
9995

96+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-5.png" alt-text="Action":::
97+
10098
8. Click **Create** to create the rewrite set.
10199

102100
9. Verify that the new rewrite set appears in the list of rewrite sets
103101

104-
![img](./media/rewrite-url-portal/rewrite-url-portal-5.png)
102+
:::image type="content" source="./media/rewrite-url-portal/rewrite-url-portal-6.png" alt-text="Add rewrite rule":::
105103

106104
## Verify URL rewrite through access logs
107105

0 commit comments

Comments
 (0)
Please sign in to comment.