-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rules] Use wildcard pattern in migration guide examples (#17461)
* Update Migrate Always Use HTTPS example * Update Forwarding URL examples with wildcards
- Loading branch information
1 parent
6fed1ab
commit 93b5b3f
Showing
5 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
Binary file modified
BIN
-42.9 KB
(55%)
src/assets/images/rules/reference/page-rules-migration/pr-always-use-https-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-23.5 KB
(70%)
src/assets/images/rules/reference/page-rules-migration/pr-forwarding-url-2-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-17.9 KB
(76%)
src/assets/images/rules/reference/page-rules-migration/pr-forwarding-url-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/content/partials/rules/page-rules-migration-wildcard-notice.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
params: | ||
- requestUrl | ||
- targetUrl | ||
--- | ||
|
||
import { Details } from "~/components"; | ||
|
||
<Details header="Notes about the rule equivalence"> | ||
|
||
The provided example using Single Redirects is not an exact match for the previously existing Page Rule in the same example. | ||
|
||
The exact equivalent would need to match both HTTP and HTTPS incoming requests, which you could achieve using a wildcard pattern like the following (notice the extra `*` after `http`): | ||
|
||
- **Request URL**: <code>{props.requestUrl}</code> | ||
|
||
This would require you to also change the **Target URL** to use the second wildcard capture group instead of the first one (corresponding to the text captured by second `*` in the wildcard pattern above): | ||
|
||
- **Target URL**: <code>{props.targetUrl}</code> | ||
|
||
</Details> |