Skip to content

Commit f6f301d

Browse files
authored
Update rewrite-http-headers-url.md
1 parent 1295726 commit f6f301d

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -208,25 +208,6 @@ Thus, the rewrite set allows users to check for a specific parameter and assign
208208

209209
For a use case example using query strings, see [Route traffic using parameter based path selection in portal](parameter-based-path-selection-portal.md).
210210

211-
* The first rule has a condition that checks the *query_string* variable for *category=shoes* and has an action that rewrites the URL path to /*listing1* and has **Re-evaluate path map** enabled
212-
213-
* The second rule has a condition that checks the *query_string* variable for *category=bags* and has an action that rewrites the URL path to /*listing2* and has **Re-evaluate path map** enabled
214-
215-
* 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
216-
217-
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario1-2.png" alt-text="URL rewrite scenario 1-2.":::
218-
219-
**Step 2 (b):** Associate this rewrite set with the default path of the above path-based rule
220-
221-
:::image type="content" source="./media/rewrite-http-headers-url/url-scenario1-3.png" alt-text="URL rewrite scenario 1-3.":::
222-
223-
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 won't 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*).
224-
225-
If the user requests *contoso.com/listing?category=shoes*, then again the default path will be matched. However, in this case the condition in the first rule will match and therefore, the action associated with the condition will be executed which will rewrite the URL path to /*listing1* and reevaluate the path-map. When the path-map is reevaluated, the request will now match the path associated with pattern */listing1* and the request will be routed to the backend associated with this pattern, which is ShoesListBackendPool.
226-
227-
> [!NOTE]
228-
> This scenario can be extended to any header or cookie value, URL path, query string or server variables based on the conditions defined and essentially enables you to route requests based on those conditions.
229-
230211
### Rewrite query string parameters based on the URL
231212

232213
Consider a scenario of a shopping website where the user visible link should be simple and legible, but the backend server needs the query string parameters to show the right content.

0 commit comments

Comments
 (0)