This Cloudflare Worker handles requests by redirecting specified paths to new destinations. It's designed to catch requests to old paths and redirect them to the new paths, while all other requests will result in the normal request being fullfilled.
The worker is deployed using Cloudflare's Wrangler CLI.
- Install Wrangler, the command-line tool for managing Cloudflare Workers.
- Configure Wrangler with your Cloudflare account details.
- Run
wrangler dev
from the root of your project directory for local testing - Run
wrangler deploy
from the root of your project directory to deploy the worker to your Cloudflare account.
This project is written in JavaScript and is meant to run on Cloudflare Workers.
- Node.js
- Wrangler CLI
src/index.js
- Main entry pointsrc/redirects.js
- JS object with the redirects
For more information and learning resources, refer to the following documentation:
- Cloudflare Workers: Cloudflare Workers Documentation
- Examples: Cloudflare Workers Examples
- Wrangler CLI: Wrangler on GitHub
Kevin - Creator and Maintainer of this Worker