From d105936f435624e52db1213a3c1218457c0ecc86 Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Wed, 24 Sep 2025 10:47:31 +0100 Subject: [PATCH 1/2] [Rules] Use DashButton in zone-level instructions --- .../cloud-connector/create-dashboard.mdx | 16 ++++---- .../examples/route-images-to-s3.mdx | 22 +++++----- .../examples/send-eu-visitors-to-gcs.mdx | 22 +++++----- .../serve-static-assets-from-azure.mdx | 22 +++++----- .../compression-rules/create-dashboard.mdx | 24 ++++++----- .../configuration-rules/create-dashboard.mdx | 24 ++++++----- .../docs/rules/custom-errors/create-rules.mdx | 22 +++++----- .../rules/custom-errors/edit-error-pages.mdx | 7 +++- .../docs/rules/normalization/manage.mdx | 10 +++-- .../rules/origin-rules/create-dashboard.mdx | 22 +++++----- .../change-uri-path-and-host-header.mdx | 40 ++++++++++--------- .../point-to-r2-bucket-with-custom-domain.mdx | 5 ++- .../page-rules/how-to/url-forwarding.mdx | 20 +++++----- src/content/docs/rules/page-rules/manage.mdx | 34 +++++++++------- .../billing-and-subscription.mdx | 21 +++++----- .../docs/rules/snippets/create-dashboard.mdx | 26 ++++++------ .../managed-transforms/configure.mdx | 16 ++++++-- .../create-dashboard.mdx | 30 +++++++------- .../create-dashboard.mdx | 30 +++++++------- .../url-rewrite/create-dashboard.mdx | 20 +++++----- .../single-redirects/create-dashboard.mdx | 18 +++++---- 21 files changed, 249 insertions(+), 202 deletions(-) diff --git a/src/content/docs/rules/cloud-connector/create-dashboard.mdx b/src/content/docs/rules/cloud-connector/create-dashboard.mdx index a1d2ea20c1dd27..4ea1ea3e37e59c 100644 --- a/src/content/docs/rules/cloud-connector/create-dashboard.mdx +++ b/src/content/docs/rules/cloud-connector/create-dashboard.mdx @@ -8,28 +8,28 @@ head: content: Configure a Cloud Connector rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; To configure a Cloud Connector rule in the dashboard: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. +1. In the Cloudflare dashboard, go to the **Cloud Connector** page. -2. Go to **Rules** > **Cloud Connector**. + -3. Select your [cloud provider](/rules/cloud-connector/providers/) (Cloudflare R2 or an external provider). +2. Select your [cloud provider](/rules/cloud-connector/providers/) (Cloudflare R2 or an external provider). -4. If you selected Cloudflare R2 in the previous step, select your bucket and your custom domain, and select **Next**.
+3. If you selected Cloudflare R2 in the previous step, select your bucket and your custom domain, and select **Next**.
If you selected a different storage provider, enter the bucket URL and select **Next**. :::caution The bucket URL must follow a [specific format](/rules/cloud-connector/providers/) according to your provider. ::: -5. Enter a descriptive name for the rule in **Cloud Connector name**. +4. Enter a descriptive name for the rule in **Cloud Connector name**. -6. Under **If**, select **Custom filter expression** and [enter an expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to define the traffic that will be redirected to the bucket. For example: +5. Under **If**, select **Custom filter expression** and [enter an expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to define the traffic that will be redirected to the bucket. For example: - To route all requests matching `http*://example.com/images/*` (HTTPS and HTTP requests) you could enter the following expression:
`http.request.full_uri wildcard "http*://example.com/images/*"` - To route all requests matching `http*://images.example.com/*` (HTTPS and HTTP requests) you could enter the following expression:
@@ -37,7 +37,7 @@ To configure a Cloud Connector rule in the dashboard: Alternatively, select **All incoming requests** to redirect all incoming traffic for your zone to the storage bucket you selected. -7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**. +6. To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**. diff --git a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx index 9597fdf4e667b6..8c3127841f07dd 100644 --- a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx +++ b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx @@ -7,28 +7,30 @@ products: - Cloud Connector --- -import { Steps } from "~/components"; +import { Steps, DashButton } from "~/components"; To route requests to `/images` on your domain to an AWS S3 bucket: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Go to **Rules** > **Cloud Connector**. -3. Select **Amazon Web Services - S3** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. You can structure the URL in two ways: +1. In the Cloudflare dashboard, go to the **Cloud Connector** page. + + + +2. Select **Amazon S3** as your [cloud provider](/rules/cloud-connector/providers/). +3. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: Set the hostname to `.s3.amazonaws.com`. In this case, your files should be organized in the root of the bucket, meaning the URI path will map directly to the file. For example, `https:///images/file.jpg` will map to `https://.s3.amazonaws.com/images/file.jpg`. - **URI path-style URL**: Set the hostname to `s3.amazonaws.com`. Here, your bucket must include a folder named `images`, and files should be placed inside this folder. The URI path will then include the bucket name, like `https:////images/file.jpg` mapping to `https://s3.amazonaws.com//images/file.jpg`. -5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `//images` to match the URI path-style URL structure. -6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days: +4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `//images` to match the URI path-style URL structure. +5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days: - **If incoming requests match** > Custom filter expression: `(starts_with(http.request.uri.path, "/images/"))` - **Cache eligibility**: Eligible for cache - **Edge TTL** > Ignore cache-control header and use this TTL: _7 days_ -7. Select **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**. -8. Under **If**, select **Custom filter expression** and enter the following expression:
+6. Select **Next** and enter a descriptive name like `Route images to S3` in **Cloud Connector name**. +7. Under **If**, select **Custom filter expression** and enter the following expression:
`http.request.full_uri wildcard "http*:///images/*"`
Replace `` with desired hostname. -9. Select **Deploy** to activate the rule. +8. Select **Deploy** to activate the rule.
diff --git a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx index ff268a3843d2b2..cdf55541b21de8 100644 --- a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx +++ b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx @@ -7,25 +7,27 @@ products: - Cloud Connector --- -import { Steps } from "~/components"; +import { Steps, DashButton } from "~/components"; To route requests from visitors in the European Union to a Google Cloud Storage bucket: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Go to **Rules** > **Cloud Connector**. -3. Select **Google Cloud Platform - Cloud Storage** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. You can structure the URL in two ways: +1. In the Cloudflare dashboard, go to the **Cloud Connector** page. + + + +2. Select **Google Cloud Storage** as your [cloud provider](/rules/cloud-connector/providers/). +3. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: For `.storage.googleapis.com`, your files should be organized in the root of the bucket. For example, `https:///index.html` will map to `https://.storage.googleapis.com/index.html`. - **URI path-style URL**: If you set the hostname to `storage.googleapis.com`, your bucket must include folders corresponding to the intended URI paths. For example, if you want `https:///eu/index.html` to map to a file in your bucket, the file should be placed at `https://storage.googleapis.com//eu/index.html`. -5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/` to match the URI path-style URL structure. -6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting). -7. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**. -8. Under **If**, select **Custom filter expression** and enter the following expression: +4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/` to match the URI path-style URL structure. +5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting). +6. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**. +7. Under **If**, select **Custom filter expression** and enter the following expression: `(ip.src.is_in_european_union)`
This expression targets traffic from European Union users. -9. Select **Deploy** to activate the rule. +8. Select **Deploy** to activate the rule.
diff --git a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx index b1d8700b609b3e..e322cc1737aaac 100644 --- a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx +++ b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx @@ -7,23 +7,25 @@ products: - Cloud Connector --- -import { Steps } from "~/components"; +import { Steps, DashButton } from "~/components"; To serve static assets from an Azure Blob Storage container: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain. -2. Navigate to **Rules** > **Cloud Connector**. -3. Select **Microsoft Azure - Blob Storage** as your [cloud provider](/rules/cloud-connector/providers/). -4. Enter the bucket URL. Use the following URL structure: +1. In the Cloudflare dashboard, go to the **Cloud Connector** page. + + + +2. Select **Microsoft Azure** as your [cloud provider](/rules/cloud-connector/providers/). +3. Enter the bucket URL. Use the following URL structure: - **Subdomain-style URL**: Set the hostname to `.blob.core.windows.net`. In this case, your bucket should include a folder named `static-assets`, and files should be placed inside this folder. For example, `https:///static-assets/style.css` will map to `https://.blob.core.windows.net/static-assets/style.css`. -5. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/static-assets` to `/my-pages-project/static-assets` to match the file structure of your object storage bucket. -6. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting). -7. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**. -8. Under **If**, select **Custom filter expression** and enter the following expression: +4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/static-assets` to `/my-pages-project/static-assets` to match the file structure of your object storage bucket. +5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting). +6. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**. +7. Under **If**, select **Custom filter expression** and enter the following expression: `http.request.full_uri wildcard "http*:///static-assets/*"`
-9. Select **Deploy** to activate the rule. +8. Select **Deploy** to activate the rule.
diff --git a/src/content/docs/rules/compression-rules/create-dashboard.mdx b/src/content/docs/rules/compression-rules/create-dashboard.mdx index 168dd351797eb4..a1a43df114ad85 100644 --- a/src/content/docs/rules/compression-rules/create-dashboard.mdx +++ b/src/content/docs/rules/compression-rules/create-dashboard.mdx @@ -6,20 +6,22 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Compression Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, select if you wish to apply the rule to [default content types](/speed/optimization/content/compression/#compression-between-cloudflare-and-website-visitors) (content types that Cloudflare compresses by default), or to requests that match a custom filter expression. -7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit rule expressions](/ruleset-engine/rules-language/expressions/edit-expressions/). -8. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings). -9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Compression Rule**. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +4. Enter a descriptive name for the rule in **Rule name**. +5. Under **When incoming requests match**, select if you wish to apply the rule to [default content types](/speed/optimization/content/compression/#compression-between-cloudflare-and-website-visitors) (content types that Cloudflare compresses by default), or to requests that match a custom filter expression. +6. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit rule expressions](/ruleset-engine/rules-language/expressions/edit-expressions/). +7. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings). +8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. - \ No newline at end of file +
diff --git a/src/content/docs/rules/configuration-rules/create-dashboard.mdx b/src/content/docs/rules/configuration-rules/create-dashboard.mdx index c98096685782a8..57ddef8c735f18 100644 --- a/src/content/docs/rules/configuration-rules/create-dashboard.mdx +++ b/src/content/docs/rules/configuration-rules/create-dashboard.mdx @@ -6,20 +6,22 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Configuration Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. -7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). -8. Under **Then the settings are**, add the [configuration settings](/rules/configuration-rules/settings/) you wish to change for requests matching the rule expression. -9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Configuration Rule**. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +4. Enter a descriptive name for the rule in **Rule name**. +5. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. +6. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). +7. Under **Then the settings are**, add the [configuration settings](/rules/configuration-rules/settings/) you wish to change for requests matching the rule expression. +8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. - \ No newline at end of file + diff --git a/src/content/docs/rules/custom-errors/create-rules.mdx b/src/content/docs/rules/custom-errors/create-rules.mdx index 63d5c5f00a6468..4ed8c2b9236f26 100644 --- a/src/content/docs/rules/custom-errors/create-rules.mdx +++ b/src/content/docs/rules/custom-errors/create-rules.mdx @@ -5,7 +5,7 @@ sidebar: order: 3 --- -import { APIRequest, Render, Steps } from "~/components"; +import { APIRequest, Render, Steps, DashButton } from "~/components"; ## In the dashboard @@ -13,27 +13,29 @@ import { APIRequest, Render, Steps } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Custom Error Rule**. -4. Enter a descriptive name for the rule in **Rule name**. -5. Under **If incoming requests match**, select one of the following options: +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Custom Error Rule**. +3. Enter a descriptive name for the rule in **Rule name**. +4. Under **If incoming requests match**, select one of the following options: - **Custom filter expression**: The rule will only apply to traffic matching a custom expression. Define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to configure which requests should be rewritten. Use either the Expression Builder or the Expression Editor to define the custom expression. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). - **All incoming requests**: The rule will apply to all responses with a `400` status code or above, except for block and challenge actions issued by Cloudflare’s security products. -6. In **Deliver a custom error response**, select the response type (either _Custom error asset_ or one of the available inline responses). +5. In **Deliver a custom error response**, select the response type (either _Custom error asset_ or one of the available inline responses). If you select _Custom error asset_, select an existing custom error asset in **Asset**, or select **Create new asset** to [create a new custom error asset](#create-a-custom-error-asset-dashboard). If you select _JSON response_, _HTML response_, _Text response_, or _XML response_, enter the custom error response you want to send to web site visitors in **JSON response**, **HTML response**, **Text response**, or **XML response**, respectively. The response can include [error tokens](/rules/custom-errors/reference/error-tokens/) that Cloudflare will replace with real values before sending the response to the visitor. The maximum response size is 10 KB. -7. (Optional) In **Response code**, enter the HTTP status code of the response (an integer value between `400` and `999`). If provided, this value will override the current response status code. +6. (Optional) In **Response code**, enter the HTTP status code of the response (an integer value between `400` and `999`). If provided, this value will override the current response status code. -8. (Optional) Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). +7. (Optional) Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). -9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. diff --git a/src/content/docs/rules/custom-errors/edit-error-pages.mdx b/src/content/docs/rules/custom-errors/edit-error-pages.mdx index f4e4dd6a8076f0..8879b128a7b25a 100644 --- a/src/content/docs/rules/custom-errors/edit-error-pages.mdx +++ b/src/content/docs/rules/custom-errors/edit-error-pages.mdx @@ -81,8 +81,11 @@ To edit a zone-level custom error page: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. -2. Go to **Error Pages** and identify your desired custom error page type. +1. In the Cloudflare dashboard, go to the **Error Pages** page. + + + +2. Identify your desired custom error page type. 3. (Optional) To preview the current error page (default or custom), select the link in the **Show** column. 4. To edit the error page, select the three dots > **Edit** next to the page type you previously identified. 5. To use Cloudflare's default page, select **Cloudflare default page.** To provide a custom error page, select **Custom page** and enter the URL of the custom error page you created. diff --git a/src/content/docs/rules/normalization/manage.mdx b/src/content/docs/rules/normalization/manage.mdx index c9e552e95dd7da..f2b118bf6d2b6f 100644 --- a/src/content/docs/rules/normalization/manage.mdx +++ b/src/content/docs/rules/normalization/manage.mdx @@ -7,16 +7,18 @@ sidebar: description: How to configure URL normalization in the Cloudflare dashboard. --- -import { Steps } from "~/components"; +import { Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the Rules **Settings** page. -2. Go to **Rules** > **Settings** and select the **URL Normalization** tab. + + +2. Go to the **URL Normalization** tab. 3. Configure the [available URL normalization settings](/rules/normalization/settings/). ![Available URL normalization settings in the Cloudflare dashboard](~/assets/images/rules/normalization/url-normalization-settings.png) - \ No newline at end of file + diff --git a/src/content/docs/rules/origin-rules/create-dashboard.mdx b/src/content/docs/rules/origin-rules/create-dashboard.mdx index 90b0e1e9a08d47..558a9c0ceeeeec 100644 --- a/src/content/docs/rules/origin-rules/create-dashboard.mdx +++ b/src/content/docs/rules/origin-rules/create-dashboard.mdx @@ -6,19 +6,21 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Origin Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/). -7. Under **Set origin parameters**, define the [origin rule settings](/rules/origin-rules/features/) you wish to change for requests matching the rule expression. -8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Origin Rule**. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +4. Enter a descriptive name for the rule in **Rule name**. +5. Under **When incoming requests match**, define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/). +6. Under **Set origin parameters**, define the [origin rule settings](/rules/origin-rules/features/) you wish to change for requests matching the rule expression. +7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. - \ No newline at end of file + diff --git a/src/content/docs/rules/origin-rules/tutorials/change-uri-path-and-host-header.mdx b/src/content/docs/rules/origin-rules/tutorials/change-uri-path-and-host-header.mdx index 41c7a41b0d0bfe..972eaf7f130d68 100644 --- a/src/content/docs/rules/origin-rules/tutorials/change-uri-path-and-host-header.mdx +++ b/src/content/docs/rules/origin-rules/tutorials/change-uri-path-and-host-header.mdx @@ -8,7 +8,7 @@ products: - Origin Rules --- -import { Example, Steps } from "~/components"; +import { Example, Steps, DashButton } from "~/components"; This tutorial will instruct you how to modify both the URI path and the `Host` header of incoming requests using [Transform Rules](/rules/transform/) and Origin Rules. @@ -25,11 +25,13 @@ By following these steps, you can effectively manage both URI paths and `Host` h -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **URL Rewrite Rule**. -4. Enter a descriptive name for the rule in **Rule name**. -5. Under **If incoming requests match**, select **Custom filter expression**, select **Edit expression**, and enter the following expression: +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **URL Rewrite Rule**. +3. Enter a descriptive name for the rule in **Rule name**. +4. Under **If incoming requests match**, select **Custom filter expression**, select **Edit expression**, and enter the following expression: @@ -41,9 +43,9 @@ By following these steps, you can effectively manage both URI paths and `Host` h -6. Under **Set Rewrite parameters**, select **Path** > **Rewrite to**, and select _Dynamic_. +5. Under **Set Rewrite parameters**, select **Path** > **Rewrite to**, and select _Dynamic_. -7. Define the action for your rewrite URL rule: +6. Define the action for your rewrite URL rule: @@ -57,7 +59,7 @@ By following these steps, you can effectively manage both URI paths and `Host` h The [`regex_replace()`](/ruleset-engine/rules-language/functions/#regex_replace) function replaces the `/uploads/` part of the path with `/`, changing `/uploads/example.jpg` to `/example.jpg`. -8. Select **Deploy**. +7. Select **Deploy**. @@ -69,11 +71,13 @@ If you are routing traffic to an object storage bucket, use [Cloud Connector](/r -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Origin Rule**. -4. Enter a descriptive name for the rule in **Rule name**. -5. Under **When incoming requests match**, define the rule expression: +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Origin Rule**. +3. Enter a descriptive name for the rule in **Rule name**. +4. Under **When incoming requests match**, define the rule expression: @@ -85,9 +89,9 @@ If you are routing traffic to an object storage bucket, use [Cloud Connector](/r -6. Under **Set origin parameters**, select **Host Header** > **Rewrite to**. +5. Under **Set origin parameters**, select **Host Header** > **Rewrite to**. -7. Configure the rule to modify the `Host` header to desired hostname: +6. Configure the rule to modify the `Host` header to desired hostname: @@ -101,7 +105,7 @@ If you are routing traffic to an object storage bucket, use [Cloud Connector](/r This will set the [`Host` header](/rules/origin-rules/features/#host-header) to `example.com` for matching requests. Make sure to replace `example.com` with your actual hostname. -8. (Optional) To route requests to a different origin (DNS target), use [DNS override](/rules/origin-rules/features/#dns-record): +7. (Optional) To route requests to a different origin (DNS target), use [DNS override](/rules/origin-rules/features/#dns-record): @@ -115,7 +119,7 @@ If you are routing traffic to an object storage bucket, use [Cloud Connector](/r This will route requests to the DNS target of `example.com` instead of your default [DNS record](/dns/manage-dns-records/how-to/create-dns-records/). -9. Select **Deploy**. +8. Select **Deploy**. diff --git a/src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx b/src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx index 05489c9d2f5340..445d42f04c3a52 100644 --- a/src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx +++ b/src/content/docs/rules/origin-rules/tutorials/point-to-r2-bucket-with-custom-domain.mdx @@ -78,7 +78,10 @@ Use a URL rewrite to remove the `/images` segment from the URL path. Cloudflare -1. Go to **Rules** > **Overview**. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + 2. Select **Create rule** > **URL Rewrite Rule**. 3. Enter a descriptive name for the rule in **Rule name**. 4. In **If incoming requests match**, select **Wildcard pattern**. diff --git a/src/content/docs/rules/page-rules/how-to/url-forwarding.mdx b/src/content/docs/rules/page-rules/how-to/url-forwarding.mdx index 79bac7b05f61cb..4176857927282a 100644 --- a/src/content/docs/rules/page-rules/how-to/url-forwarding.mdx +++ b/src/content/docs/rules/page-rules/how-to/url-forwarding.mdx @@ -7,7 +7,7 @@ sidebar: label: URL forwarding --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; Page Rules allow you to forward or redirect traffic to a different URL, though they are just one of the [options provided by Cloudflare](/fundamentals/reference/redirects/). @@ -21,14 +21,16 @@ To configure URL forwarding or redirects using Page Rules: -1. Log in to your [Cloudflare account](https://dash.cloudflare.com), and select your account and domain. -2. Go to **Rules** > **Page Rules**. -3. Under **Page Rules**, select **Create Page Rule**. -4. Under **If the URL matches**, enter the URL or URL pattern that should match the rule. -5. In **Pick a Setting**, choose **Forwarding URL** from the drop-down menu. -6. For **Select status code**, choose _301 - Permanent Redirect_ or _302 - Temporary Redirect_. -7. Enter the destination URL. -8. Select **Save and Deploy Page Rule**. +1. In the Cloudflare dashboard, go to the **Page Rules** page. + + + +2. Select **Create Page Rule**. +3. Under **If the URL matches**, enter the URL or URL pattern that should match the rule. +4. In **Pick a Setting**, choose **Forwarding URL** from the drop-down menu. +5. For **Select status code**, choose _301 - Permanent Redirect_ or _302 - Temporary Redirect_. +6. Enter the destination URL. +7. Select **Save and Deploy Page Rule**. diff --git a/src/content/docs/rules/page-rules/manage.mdx b/src/content/docs/rules/page-rules/manage.mdx index 6c0130202ba5d6..12b69d4aa85600 100644 --- a/src/content/docs/rules/page-rules/manage.mdx +++ b/src/content/docs/rules/page-rules/manage.mdx @@ -6,7 +6,7 @@ sidebar: label: Manage --- -import { Render, TabItem, Tabs, Steps } from "~/components"; +import { Render, TabItem, Tabs, Steps, DashButton } from "~/components"; You can manage Page Rules in the Cloudflare dashboard or via API. @@ -20,13 +20,15 @@ To create a page rule in the dashboard: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain. -2. Go to **Rules** > **Page Rules**. -3. Select **Create Page Rule**. -4. For **URL**, enter the URL or URL pattern that should match the rule ([more details about wildcard matching](/rules/page-rules/reference/wildcard-matching/)). -5. For **Pick a Setting**, select a [Cloudflare setting](/rules/page-rules/reference/settings/) to adjust. If desired, select **Add a Setting** to adjust multiple Cloudflare settings with the same rule. -6. In the **Order** dropdown, specify the desired order: _First, Last_ or _Custom_. -7. To save and deploy your rule, select **Save and Deploy Page Rule**. If you are not ready to deploy your rule, select **Save as Draft**. +1. In the Cloudflare dashboard, go to the **Page Rules** page. + + + +2. Select **Create Page Rule**. +3. For **URL**, enter the URL or URL pattern that should match the rule ([more details about wildcard matching](/rules/page-rules/reference/wildcard-matching/)). +4. For **Pick a Setting**, select a [Cloudflare setting](/rules/page-rules/reference/settings/) to adjust. If desired, select **Add a Setting** to adjust multiple Cloudflare settings with the same rule. +5. In the **Order** dropdown, specify the desired order: _First, Last_ or _Custom_. +6. To save and deploy your rule, select **Save and Deploy Page Rule**. If you are not ready to deploy your rule, select **Save as Draft**. @@ -57,9 +59,11 @@ To edit a page rule in the dashboard: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain. -2. Go to **Rules** > **Page Rules**. -3. For a specific rule: +1. In the Cloudflare dashboard, go to the **Page Rules** page. + + + +2. For a specific rule: - To enable or disable the rule, select the on/off toggle. - To modify the URL pattern, settings, and order, select **Edit** (wrench icon). Then, enter the information you want to change. @@ -81,9 +85,11 @@ To delete a page rule in the dashboard: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain. -2. Go to **Rules** > **Page Rules**. -3. For a specific rule, select **X**. Then, select **Delete**. +1. In the Cloudflare dashboard, go to the **Page Rules** page. + + + +2. For a specific rule, select **X**. Then, select **Delete**. diff --git a/src/content/docs/rules/page-rules/troubleshooting/billing-and-subscription.mdx b/src/content/docs/rules/page-rules/troubleshooting/billing-and-subscription.mdx index bc6e475b3c8a60..17f725dca0b198 100644 --- a/src/content/docs/rules/page-rules/troubleshooting/billing-and-subscription.mdx +++ b/src/content/docs/rules/page-rules/troubleshooting/billing-and-subscription.mdx @@ -1,13 +1,12 @@ --- pcx_content_type: faq source: https://support.cloudflare.com/hc/en-us/articles/225894428-Purchasing-Additional-Page-Rules -title: Billing and subscription -head: - - tag: title - content: Billing and subscription FAQ | Page Rules +title: Page Rules billing and subscription FAQ +sidebar: + label: Billing and subscription --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; @@ -21,10 +20,14 @@ To cancel a purchase: -1. Go to [your Account Subscriptions settings](http://dash.cloudflare.com/?to=/:account/billing/subscriptions). -2. Find the associated website (listed in alphabetical order) and select **Edit**. -3. For **Additional page rules**, change the amount to your previous value. If you are over your current limit, you may have to delete existing page rules (paused or active). -4. Finish the updates to your subscription. +1. In the Cloudflare dashboard, go to the **Billing** page. + + + +2. Go to **Subscriptions**. +3. Find the associated website (listed in alphabetical order) and select **Edit**. +4. For **Additional page rules**, change the amount to your previous value. If you are over your current limit, you may have to delete existing page rules (paused or active). +5. Finish the updates to your subscription. diff --git a/src/content/docs/rules/snippets/create-dashboard.mdx b/src/content/docs/rules/snippets/create-dashboard.mdx index 051cb9aa79b918..255a487ab3f44f 100644 --- a/src/content/docs/rules/snippets/create-dashboard.mdx +++ b/src/content/docs/rules/snippets/create-dashboard.mdx @@ -9,32 +9,32 @@ head: content: Create a snippet in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the **Snippets** page. -2. Go to **Rules** > **Snippets**. + -3. (Optional) If you have not created any snippets yet, select one of the snippet templates that addresses a common use case. Then, review and adjust the proposed snippet code. +2. (Optional) If you have not created any snippets yet, select one of the snippet templates that addresses a common use case. Then, review and adjust the proposed snippet code. To start from scratch, select **Create Snippet**. -4. In **Snippet name**, enter a descriptive name for the snippet. You cannot change the name after creating the snippet. +3. In **Snippet name**, enter a descriptive name for the snippet. You cannot change the name after creating the snippet. -5. Enter the snippet's JavaScript code in the code editor. You can test how your snippet will handle incoming requests using the **HTTP** and **Preview** tabs. +4. Enter the snippet's JavaScript code in the code editor. You can test how your snippet will handle incoming requests using the **HTTP** and **Preview** tabs. -6. Select **Snippet rule** to configure when the snippet will run. +5. Select **Snippet rule** to configure when the snippet will run. -7. Under **Run this Snippet if incoming requests match**, select if you wish to run the snippet only for requests that match a custom filter expression or for all incoming requests. +6. Under **Run this Snippet if incoming requests match**, select if you wish to run the snippet only for requests that match a custom filter expression or for all incoming requests. -8. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). +7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). -9. Select **Done**. +8. Select **Done**. -10. To deploy your snippet, select **Deploy**. If you are not ready to deploy your snippet, open the dropdown next to **Deploy** and select **Save as Draft**. +9. To deploy your snippet, select **Deploy**. If you are not ready to deploy your snippet, open the dropdown next to **Deploy** and select **Save as Draft**. - + - \ No newline at end of file + diff --git a/src/content/docs/rules/transform/managed-transforms/configure.mdx b/src/content/docs/rules/transform/managed-transforms/configure.mdx index 440feebb746d25..cc065427973224 100644 --- a/src/content/docs/rules/transform/managed-transforms/configure.mdx +++ b/src/content/docs/rules/transform/managed-transforms/configure.mdx @@ -6,17 +6,25 @@ sidebar: description: Learn how to configure Managed Transforms. --- -import { Details, TabItem, Tabs, Render, Steps, APIRequest } from "~/components"; +import { + Details, + TabItem, + Tabs, + Render, + Steps, + APIRequest, + DashButton, +} from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the Rules **Settings** page. -2. Go to **Rules** > **Settings**. + -3. In the **Managed Transforms** tab, enable or disable the [desired Managed Transforms](/rules/transform/managed-transforms/reference/) by selecting the toggle next to each entry. Some Managed Transforms may not be available in your Cloudflare plan or product subscriptions. +2. In the **Managed Transforms** tab, enable or disable the [desired Managed Transforms](/rules/transform/managed-transforms/reference/) by selecting the toggle next to each entry. Some Managed Transforms may not be available in your Cloudflare plan or product subscriptions. diff --git a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx index c606dea0c93b74..f989cb9a12decf 100644 --- a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx @@ -6,7 +6,7 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Request+modification) for examples of rule definitions. @@ -14,39 +14,39 @@ To create a rule: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. -2. Go to **Rules** > **Overview**. + -3. Select **Create rule** > **Request Header Transform Rule**. +2. Select **Create rule** > **Request Header Transform Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. +4. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. +5. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. -7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). +6. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). :::note Check the [available fields and functions](/rules/transform/request-header-modification/reference/fields-functions/). ::: -8. For **Modify request header**, select one of the following options: +7. For **Modify request header**, select one of the following options: - _Set static_ — Sets the value of an HTTP request header to a static string value. Overrides the value of an existing header with the same name or adds a new header if it does not exist. - _Set dynamic_ — Sets the value of an HTTP request header according to the provided expression. Overrides the value of an existing header with the same name or adds a new header if it does not exist. - _Remove_ — Removes the HTTP request header with the provided name, if it exists. -9. Enter the name of the HTTP request header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. +8. Enter the name of the HTTP request header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. -10. To modify another HTTP request header in the same rule, select **Set new header**. You can modify up to 30 HTTP request headers in a single rule. +9. To modify another HTTP request header in the same rule, select **Set new header**. You can modify up to 30 HTTP request headers in a single rule. - The following example includes the modification of three headers: + The following example includes the modification of three headers: - ![Example configuration performing three request header modifications: set a dynamic header value, set a static header value, and remove an existing header.](~/assets/images/rules/transform/request-header-modification-example.png) + ![Example configuration performing three request header modifications: set a dynamic header value, set a static header value, and remove an existing header.](~/assets/images/rules/transform/request-header-modification-example.png) -11. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +10. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. - \ No newline at end of file + diff --git a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx index c961f928c52ae5..2903233f1b83ea 100644 --- a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx @@ -6,7 +6,7 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Response+modification) for examples of rule definitions. @@ -14,41 +14,41 @@ To create a rule: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. -2. Go to **Rules** > **Overview**. + -3. Select **Create rule** > **Response Header Transform Rule**. +2. Select **Create rule** > **Response Header Transform Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. +4. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. +5. Under **When incoming requests match**, select if you wish to apply the rule to all incoming requests or only to requests that match a custom filter expression. -7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). +6. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). :::note Check the [available fields and functions](/rules/transform/response-header-modification/reference/fields-functions/). ::: -8. For **Modify response header**, select one of the following operations: +7. For **Modify response header**, select one of the following operations: - _Add static_ — Adds an HTTP response header with a static string value. This operation will not remove any existing response headers with the same name. - _Add dynamic_ — Adds an HTTP response header according to the provided expression. This operation will not remove any existing response headers with the same name. - _Set static_ — Sets the value of an HTTP response header to a static string value. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. - _Set dynamic_ — Sets the value of an HTTP response header according to the provided expression. Overrides the value of any existing headers with the same name or adds a new header if it does not exist. - _Remove_ — Removes the HTTP response header with the provided name, if it exists. -9. Enter the name of the HTTP response header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. +8. Enter the name of the HTTP response header to modify in **Header name** and the static value or expression in **Value**, if you are setting the header value. -10. To modify another HTTP response header in the same rule, select **Set new header**. You can modify up to 30 HTTP response headers in a single rule. +9. To modify another HTTP response header in the same rule, select **Set new header**. You can modify up to 30 HTTP response headers in a single rule. - The following example includes the modification of three response headers: + The following example includes the modification of three response headers: - ![Example configuration performing three response header modifications: set a dynamic header value, set a static header value, and remove an existing header.](~/assets/images/rules/transform/response-header-modification-example.png) + ![Example configuration performing three response header modifications: set a dynamic header value, set a static header value, and remove an existing header.](~/assets/images/rules/transform/response-header-modification-example.png) -11. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +10. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. - \ No newline at end of file + diff --git a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx index a6cd70c8c89e03..e648c9c5ba21e4 100644 --- a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx +++ b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx @@ -6,7 +6,7 @@ sidebar: label: Create a rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Rewrite+URL) for examples of rule definitions. @@ -14,19 +14,19 @@ To create a rule: -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website. +1. In the Cloudflare dashboard, go to the Rules **Overview** page. -2. Go to **Rules** > **Overview**. + -3. Select **Create rule** > **URL Rewrite Rule**. +2. Select **Create rule** > **URL Rewrite Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. +4. Enter a descriptive name for the rule in **Rule name**. ![The URL rewrite rule creation page in the Cloudflare dashboard.](~/assets/images/rules/transform/create-url-rewrite-rule.png) -6. Under **If incoming requests match**, select one of the following options: +5. Under **If incoming requests match**, select one of the following options: - **Wildcard pattern**: The rule will only apply to traffic matching the wildcard pattern in **Request URL**. Refer to [Wildcard pattern parameters](#wildcard-pattern-parameters) for details. - **Custom filter expression**: The rule will only apply to traffic matching a custom expression. Define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to configure which requests should be rewritten. Use either the Expression Builder or the Expression Editor to define the custom expression. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/). @@ -37,7 +37,7 @@ To create a rule: - **All incoming requests**: The rule will apply to all traffic. -7. (Optional) Define the action for your URL rewrite rule by selecting one of the available options displayed as radio buttons, and then a value from the drop-down list, depending on the action: +6. (Optional) Define the action for your URL rewrite rule by selecting one of the available options displayed as radio buttons, and then a value from the drop-down list, depending on the action: - If you select **Rewrite to** > _Static_, enter the string that will replace the original URL path (or query string). For example, enter `welcome-gb.html` to rewrite the original URL path to `/welcome-gb.html`. - If you select **Rewrite to** > _Dynamic_, enter a [rewrite expression](/rules/transform/url-rewrite/reference/fields-functions/#rewrite-expressions) that defines the dynamic URL rewrite to perform. @@ -46,9 +46,9 @@ To create a rule: For more information, refer to [URL rewrite parameters](/rules/transform/url-rewrite/reference/parameters/). -8. (Optional) Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). +7. (Optional) Under **Place at**, define where to place the rule in the rules list: first rule in the list, last rule in the list, or in a custom position (after a given rule). -9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. diff --git a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx index e9a06eb9ebe5b5..624c463d670945 100644 --- a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx +++ b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx @@ -6,16 +6,18 @@ sidebar: label: Create rule in the dashboard --- -import { Render, Steps } from "~/components"; +import { Render, Steps, DashButton } from "~/components"; -1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain. -2. Go to **Rules** > **Overview**. -3. Select **Create rule** > **Redirect Rule**. -4. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. -5. Enter a descriptive name for the rule in **Rule name**. -6. Under **When incoming requests match**, select one of the following options: +1. In the Cloudflare dashboard, go to the Rules **Overview** page. + + + +2. Select **Create rule** > **Redirect Rule**. +3. (Optional) Select one of the rule templates that address common use cases. Then, review and adjust the proposed rule configuration. +4. Enter a descriptive name for the rule in **Rule name**. +5. Under **When incoming requests match**, select one of the following options: - **Wildcard pattern**: The rule will only apply to traffic matching the wildcard pattern. - **Request URL**: Enter the [wildcard pattern](/ruleset-engine/rules-language/operators/#wildcard-matching) using the asterisk (`*`) character to match multiple requests. For example, `http*://*.example.com/files/*`. - **Then**: Define the [URL redirect settings](/rules/url-forwarding/single-redirects/settings/) including: @@ -27,7 +29,7 @@ import { Render, Steps } from "~/components"; - **Custom filter expression**: The rule will only apply to traffic matching a custom expression. Define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/) to configure which requests should be redirected. - **Then**: Define the [URL redirect settings](/rules/url-forwarding/single-redirects/settings/) for requests matching the custom rule expression. -7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. +6. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**. From 0a0a1e0db4cf6f0ab4fb1ae7f194bd2f17021ce4 Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Wed, 24 Sep 2025 11:56:00 +0100 Subject: [PATCH 2/2] Remove italics --- .../rules/cloud-connector/examples/route-images-to-s3.mdx | 4 ++-- .../cloud-connector/examples/send-eu-visitors-to-gcs.mdx | 4 ++-- .../examples/serve-static-assets-from-azure.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx index 8c3127841f07dd..2ed4dcffbabd10 100644 --- a/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx +++ b/src/content/docs/rules/cloud-connector/examples/route-images-to-s3.mdx @@ -21,8 +21,8 @@ To route requests to `/images` on your domain to an AWS S3 bucket: 3. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: Set the hostname to `.s3.amazonaws.com`. In this case, your files should be organized in the root of the bucket, meaning the URI path will map directly to the file. For example, `https:///images/file.jpg` will map to `https://.s3.amazonaws.com/images/file.jpg`. - **URI path-style URL**: Set the hostname to `s3.amazonaws.com`. Here, your bucket must include a folder named `images`, and files should be placed inside this folder. The URI path will then include the bucket name, like `https:////images/file.jpg` mapping to `https://s3.amazonaws.com//images/file.jpg`. -4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `//images` to match the URI path-style URL structure. -5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days: +4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/images` to `//images` to match the URI path-style URL structure. +5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/images/*` URI path for seven days: - **If incoming requests match** > Custom filter expression: `(starts_with(http.request.uri.path, "/images/"))` - **Cache eligibility**: Eligible for cache - **Edge TTL** > Ignore cache-control header and use this TTL: _7 days_ diff --git a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx index cdf55541b21de8..f3e54389c6bc98 100644 --- a/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx +++ b/src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx @@ -21,8 +21,8 @@ To route requests from visitors in the European Union to a Google Cloud Storage 3. Enter the bucket URL. You can structure the URL in two ways: - **Subdomain-style URL**: For `.storage.googleapis.com`, your files should be organized in the root of the bucket. For example, `https:///index.html` will map to `https://.storage.googleapis.com/index.html`. - **URI path-style URL**: If you set the hostname to `storage.googleapis.com`, your bucket must include folders corresponding to the intended URI paths. For example, if you want `https:///eu/index.html` to map to a file in your bucket, the file should be placed at `https://storage.googleapis.com//eu/index.html`. -4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/` to match the URI path-style URL structure. -5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting). +4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/` to match the URI path-style URL structure. +5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/eu` URI path for seven days (defined through the **Edge TTL** setting). 6. Select **Next** and enter a descriptive name like `Route EU visitors to GCP` in **Cloud Connector name**. 7. Under **If**, select **Custom filter expression** and enter the following expression: `(ip.src.is_in_european_union)`
diff --git a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx index e322cc1737aaac..698eb5dd4bd682 100644 --- a/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx +++ b/src/content/docs/rules/cloud-connector/examples/serve-static-assets-from-azure.mdx @@ -20,8 +20,8 @@ To serve static assets from an Azure Blob Storage container: 2. Select **Microsoft Azure** as your [cloud provider](/rules/cloud-connector/providers/). 3. Enter the bucket URL. Use the following URL structure: - **Subdomain-style URL**: Set the hostname to `.blob.core.windows.net`. In this case, your bucket should include a folder named `static-assets`, and files should be placed inside this folder. For example, `https:///static-assets/style.css` will map to `https://.blob.core.windows.net/static-assets/style.css`. -4. _(Optional)_ Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/static-assets` to `/my-pages-project/static-assets` to match the file structure of your object storage bucket. -5. _(Optional)_ Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting). +4. (Optional) Use [URL Rewrite Rules](/rules/transform/url-rewrite/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/static-assets` to `/my-pages-project/static-assets` to match the file structure of your object storage bucket. +5. (Optional) Use [Cache Rules](/cache/how-to/cache-rules/) to adjust the caching behavior for objects returned from the bucket. For example, you can [create a cache rule](/cache/how-to/cache-rules/create-dashboard/) that caches every returned object matching the `/static-assets` URI path for seven days (defined through the **Edge TTL** setting). 6. Click **Next** and enter a descriptive name like `Serve static assets from Azure` in **Cloud Connector name**. 7. Under **If**, select **Custom filter expression** and enter the following expression: `http.request.full_uri wildcard "http*:///static-assets/*"`