[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/rules/transform/examples/rewrite-path-object-storage/ [Back]  [Original]

Rewrite path for object storage bucket Cloudflare Rules docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /Rules
  3. /
  4. /Examples
  5. /Rewrite path for object storage bucket

Rewrite path for object storage bucket

Create a URL rewrite rule (part of Transform Rules) to remove /files/ from URI paths before routing request to your object storage bucket.

Last updated Oct 13, 2025Copy as MarkdownView as MarkdownAgent setup

To remove /files/ from URI paths before routing request to your object storage bucket, create a new URL rewrite rule and define a dynamic URL path rewrite using wildcard pattern parameters:

When incoming requests match

  • Wildcard pattern
    • Request URL: https://<YOUR_HOSTNAME>/files/*

Then rewrite the path and/or query

  • Target path: [/] files/*
  • Rewrite to: [/] ${1}

Make sure to replace <YOUR_HOSTNAME> with your actual hostname and adjust the example paths according to your setup. Then, use Cloud Connector to route traffic to an object storage bucket.

PreviousRewrite page path for visitors in specific countriesNextRewrite path of archived blog posts

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page