Advanced URL Redirects Using Workers

So, I want to redirect to and then* (replace * with any text) would redirect to* (replace * with the text inputted into*)

For example:
If I type in, I’ll be redirected to

You can use Page Rules instead of Workers. It’s simpler than worker. You can create a Page Rule like this