You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/rules/origin-rules/tutorials/point-to-pages-with-custom-domain.mdx
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,26 +64,32 @@ If using the Expression Editor, enter the following expression:
64
64
65
65
In this example, the URL that website visitors will access starts with `/blog`. However, the Pages deployment does not have this initial URL segment.
66
66
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.
68
68
69
69
1. Go to **Rules** > **Overview**.
70
70
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**.
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**:
80
82
81
83
| Target path | Rewrite to |
82
84
| ----------- | ---------- |
83
85
|`blog/*`|`${1}`|
84
86
85
87
7. Select **Deploy**.
86
88
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
+
87
93
## More resources
88
94
89
95
-[Tutorial: Change URI Path and Host Header](/rules/origin-rules/tutorials/change-uri-path-and-host-header/)
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**:
83
85
84
86
| Target path | Rewrite to |
85
87
| ----------- | ---------- |
86
88
|`images/*`|`${1}`|
87
89
88
90
7. Select **Deploy**.
89
91
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
+
90
96
## More resources
91
97
92
98
-[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/)
0 commit comments