Subdomain Redirection for `/blog` Not Working

Hello Cloudflare Support,

I have configured a Cloudflare Worker to handle redirection for a subdomain.

The intended behavior is to redirect all requests to the /blog path on the main domain to the corresponding subdomain (e.g., picsht.com/blog blog.picsht.com).

However, the redirection is not working as expected, and requests to the /blog path are not being redirected to the subdomain.

Here are the details of my setup:
  • Worker Script: The script is configured to intercept requests to `/blog` and replace the domain with the subdomain `blog.picsht.com`.
  • Worker Route: The route `*picsht.com/blog*` is set up to handle these requests.
  • Expected Behavior: Requests to picsht.com/blog or picsht.com/blog/some-post should redirect to blog.picsht.com or blog.picsht.com/some-post.
  • Issue Observed: The redirection does not occur, and the request stays on the main domain.
Can you please assist me in identifying and resolving the issue? If additional information is required, I am happy to provide it. I have attached the Worker routes setup and the worker code.

Thank you!
Screenshot_from_2025-01-17_13-04-01.png
Screenshot_from_2025-01-17_13-03-47.png
Was this page helpful?