Skip to content

Commit 8632a9a

Browse files
committed
SME review
1 parent 5ca48be commit 8632a9a

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

src/content/docs/rules/origin-rules/tutorials/point-to-pages-with-custom-domain.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,32 @@ If using the Expression Editor, enter the following expression:
6464

6565
In this example, the URL that website visitors will access starts with `/blog`. However, the Pages deployment does not have this initial URL segment.
6666

67-
Use a URL rewrite to remove the `/blog` segment from the URL path. Cloudflare provides a rule template in the dashboard called **Rewrite Path for Object Storage Bucket** that you can use to configure the required rewrite.
67+
Use a URL rewrite to remove the `/blog` segment from the URL path.
6868

6969
1. Go to **Rules** > **Overview**.
7070
2. Select **Create rule** > **URL Rewrite Rule**.
71-
3. Locate the **Rewrite Path for Object Storage Bucket** rule template, and select **Create a rule**.
72-
4. Update the rule name.
73-
5. Change the value in **Request URL** to:
71+
3. Enter a descriptive name for the rule in **Rule name**.
72+
4. In **If incoming requests match**, select **Wildcard pattern**.
73+
5. Enter the following value in **Request URL**:
7474

7575
```txt
7676
https://<YOUR_HOSTNAME>/blog/*
7777
```
7878

79-
6. Change the value in **Target path** to:
79+
In the current example, the value would be `https://mycustomerexample.com/blog/*`.
80+
81+
6. In **Then rewrite the path and/or query**, enter the following values under **Path**:
8082

8183
| Target path | Rewrite to |
8284
| ----------- | ---------- |
8385
| `blog/*` | `${1}` |
8486

8587
7. Select **Deploy**.
8688

89+
:::note
90+
Cloudflare provides a rule template in the dashboard called **Rewrite Path for Object Storage Bucket** that you can use and adapt to configure the URL rewrite rule.
91+
:::
92+
8793
## More resources
8894

8995
- [Tutorial: Change URI Path and Host Header](/rules/origin-rules/tutorials/change-uri-path-and-host-header/)

src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,30 @@ Use a URL rewrite to remove the `/images` segment from the URL path. Cloudflare
7171

7272
1. Go to **Rules** > **Overview**.
7373
2. Select **Create rule** > **URL Rewrite Rule**.
74-
3. Locate the **Rewrite Path for Object Storage Bucket** rule template, and select **Create a rule**.
75-
4. Update the rule name.
76-
5. Change the value in **Request URL** to:
74+
3. Enter a descriptive name for the rule in **Rule name**.
75+
4. In **If incoming requests match**, select **Wildcard pattern**.
76+
5. Enter the following value in **Request URL**:
7777

7878
```txt
7979
https://<YOUR_HOSTNAME>/images/*
8080
```
8181

82-
6. Change the values under **Path** to:
82+
In the current example, the value would be `https://mycustomerexample.com/images/*`.
83+
84+
6. In **Then rewrite the path and/or query**, enter the following values under **Path**:
8385

8486
| Target path | Rewrite to |
8587
| ----------- | ---------- |
8688
| `images/*` | `${1}` |
8789

8890
7. Select **Deploy**.
8991

92+
:::note
93+
Cloudflare provides a rule template in the dashboard called **Rewrite Path for Object Storage Bucket** that you can use and adapt to configure the URL rewrite rule.
94+
:::
95+
9096
## More resources
9197

9298
- [Tutorial: Change URI Path and Host Header](/rules/origin-rules/tutorials/change-uri-path-and-host-header/)
93-
- [Cloudflare R2: Public buckets](https://developers.cloudflare.com/r2/buckets/public-buckets/)
99+
- [Cloudflare R2: Public buckets](/r2/buckets/public-buckets/)
94100
- [DNS records](/dns/manage-dns-records/)

0 commit comments

Comments
 (0)