cloudflare · Cloudflare Workers Docs
Workers Redirects
How to configure and structure a redirects file within a Workers static assets directory to manage URL redirection rules, including syntax for source paths, destinations, status codes, wildcards, and placeholders.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Redirects
How to configure and structure a redirects file within a Workers static assets directory to manage URL redirection rules, including syntax for source paths, destinations, status codes, wildcards, and placeholders.
When To Use
Use when you need to implement URL redirection rules for a project using Cloudflare Workers static assets via a redirects file.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-static-assets-redirects-workflow-guide.md | Documentation explaining how to configure custom URL redirects using a plain text file within a Cloudflare Workers static assets project. | Questions about documentation explaining how to configure custom URL redirects using a plain text file within a Cloudflare Workers st... |
examples/workers-static-assets-redirects-cloudflare-workers-static-assets-redirec.text | A text representation of the source, destination, and status code syntax used for configuring Workers static asset redirects. | Exact payloads, commands, or snippets shown in A text representation of the source, destination, and status code syntax used for configuring Workers static asset re... |
examples/workers-static-assets-redirects-cloudflare-workers-static-assets-redirec-2.text | A text-based list of redirect rules mapping source paths to destination URLs and status codes for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A text-based list of redirect rules mapping source paths to destination URLs and status codes for Cloudflare Workers... |
examples/workers-static-assets-redirects-cloudflare-workers-static-assets-redirec-3.text | A list of pattern-based URL redirect rules for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A list of pattern-based URL redirect rules for Cloudflare Workers static assets. |
examples/workers-static-assets-redirects-cloudflare-workers-static-assets-redirec-4.text | A text file demonstrating the syntax for mapping source paths to destination paths and status codes in Cloudflare Workers static assets redirects. | Exact payloads, commands, or snippets shown in A text file demonstrating the syntax for mapping source paths to destination paths and status codes in Cloudflare Wor... |
examples/workers-static-assets-redirects-cloudflare-workers-static-assets-redirec-5.text | A list of redirect rules mapping specific URL patterns to canonical links for Cloudflare Workers static assets. | Exact payloads, commands, or snippets shown in A list of redirect rules mapping specific URL patterns to canonical links for Cloudflare Workers static assets. |
What This Skill Covers
- To apply custom redirects on a Worker with static assets, declare your redirects in a plain text file called redirects without a file extension, in the stati...
- Main sections:
Structure,Per line,Per file,Advanced redirects,Redirects and header matching.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/static-assets/redirects
