Icon

Redirects are often more complicated than: ''Send traffic to this URL over to this other URL.'' You often need business logic to make routing decisions for site migrations, promotional campaigns, and loyalty programs.

For example: Let’s assume the old site used a product sku in product-related URLs, but a revamped, new site uses a “tag” for SEO purposes.

Old url: www.example.com/sku/{product_sku}/*

New url: www.example.com/products/{product_tag}/*

E.g., sku is 483D5F; tag denotes straight-fit-denim-jeans

Old “reviews” url: www.example.com/sku/483D5F/reviews

New “reviews” url: www.example.com/products/straight-fit-denim-jeans/reviews

Loading...

https://www.edgecompute.live/sku/483D5F/reviews

Copied to clipboard!

Note the URL path changing from /sku/483D5F/reviews to products/straight-fit-denim-jeans/reviews

This example uses EdgeWorkers + EdgeKV to extract a query string product SKU from an incoming URL, match it against a SKU stored in a KV database, and properly redirect the browser to the new product page.

Icon landscape
Distributed Data

Pushing data to the edge speeds up websites by avoiding central bottlenecks.

Icon landscape
Ease Development

Enable developers to modify application behavior without touching origin server logic.

Icon landscape
Improve Reliability

Move compute cycles to the edge, reducing load and improving reliability and performance of origin servers.

Icon landscape
Reduce Latency

Speed up response times by moving work closer to users.

Related Examples

View More
Icon Card background
A/B Testing

Randomly assigns a new user to a group for A/B testing. The assignment is stored in a cookie and passed to the origin in a query parameter. The A/B group can be forced via a query string parameter for easy testing. The group names, percentage split, cookie name, and query parameter name are configured through constants in the EdgeWorker JavaScript module.

View Case
Icon Card background
Conference/Meeting Details

Implements a Conference Attendance Code API call that returns the meeting details of a conference as HTML if the user provides the correct code. With abc123 in the key GET parameter, the user is shown conference details. If the parameter is incorrect, an error is returned, keeping the information away from the browser to maintain confidentiality.

View Case
Icon Card background
Device Routing

Implements modification of the forward origin path of the URL to return device-specific content.

View Case