Skip to content

Commit 18c2c5f

Browse files
committed
fix indentation
1 parent d060156 commit 18c2c5f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/frontdoor/rules-engine-scenarios.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ Managing redirects is critical for search engine optimization (SEO), user experi
8484

8585
This approach eliminates the need to create a separate rule for each tenant ID, allowing you to handle dynamic routing with fewer rules.
8686

87-
# [**Portal**](#tab/portal)
87+
# [**Portal**](#tab/portal)
8888

8989
:::image type="content" source="./media/rules-engine-scenarios/redirect-url-path-segment.png" alt-text="Screenshot that shows how to use fixed-length path segment to redirect URL." lightbox="./media/rules-engine-scenarios/redirect-url-path-segment.png":::
9090

91-
# [**ARM**](#tab/arm)
91+
# [**ARM**](#tab/arm)
9292

9393
```json
9494
{
@@ -119,19 +119,19 @@ Managing redirects is critical for search engine optimization (SEO), user experi
119119
}
120120
```
121121

122-
---
122+
---
123123

124124
- **Redirect based on dynamic-length URL path segments:** When the URL path segment has a dynamic length, you can extract it using the `{url_path:seg#}`. For more information, see [Server variable format](/azure/frontdoor/rule-set-server-variables#server-variable-format).
125125

126126
For example, if a tenant ID or location is embedded in the URL segment, such as: `https://api.contoso.com/{tenantId}/xyz`, you can extract `{tenantId}` from the URL and decide the correct redirect in the format of `tenantId.backend.com/xyz` with server variable `{url_path:seg0}.backend.com` in the redirect destination host.
127127

128128
This method avoids creating separate rules for each tenant ID, enabling more efficient configuration.
129129

130-
# [**Portal**](#tab/portal)
130+
# [**Portal**](#tab/portal)
131131

132-
N/A
132+
N/A
133133

134-
# [**ARM**](#tab/arm)
134+
# [**ARM**](#tab/arm)
135135

136136
```json
137137
{
@@ -162,17 +162,17 @@ N/A
162162
}
163163
```
164164

165-
---
165+
---
166166

167167
- **Redirect based on part of the incoming hostname:** You can redirect requests to different origins by extracting part of the incoming hostname.
168168

169169
For example, you can capture `tenantName` from `https://[tenantName].poc.contoso.com/GB` to redirect the request to `s1.example.com/Buyer/Main?realm=[tenantName]&examplename=example1` using the offset and length in server variable in the format of `{hostname:0:-16}`. For more information, see [Server variable format](/azure/frontdoor/rule-set-server-variables#server-variable-format).
170170

171-
# [**Portal**](#tab/portal)
171+
# [**Portal**](#tab/portal)
172172

173173
:::image type="content" source="./media/rules-engine-scenarios/redirect-incoming-hostname.png" alt-text="Screenshot that shows how to use incoming hostname to redirect URL." lightbox="./media/rules-engine-scenarios/redirect-incoming-hostname.png":::
174174

175-
# [**ARM**](#tab/arm)
175+
# [**ARM**](#tab/arm)
176176

177177
```json
178178
{
@@ -217,7 +217,7 @@ N/A
217217
}
218218
```
219219

220-
---
220+
---
221221

222222
## Scenario 2: Populate or modify a response header based on a request header value
223223

0 commit comments

Comments
 (0)