a simple script that proxies the content from another website to a path under your domain
tadilatimkacpara.com/blog
FROM=
https://blog.tadilatimkacpara.com
TO=
/blog
- create a worker from cloudflare dashboard
- add
FROM
andTO
environment variables ¹ - paste the script to the worker source
- FROM stands for local path name (/lorem/ipsum) TO stands for remote url (https://example.com)
- go to workers under your domain
- add the worker with routes *.example.com/* and example.com/* ¹
-
to be sure that worker will be availabe both on www.example.com and example.com ²
-
you do not need to add two worker config (.examlpe.com/ and example.com/*) if you are redirecting example.com to www.example.com or www.example.com to example.com