Transformation Question

I need some help / guidance on how to handle this task as what transformation.

URL Path Matches .*
HTTP_HOST Matches the pattern. ([0-9.]\d{0,2}).domain com

Redirect HTTPS:// www domain com/techform/?tech={C:1}

Just need a simple rewrite to make the above happen.

Ha! not so simple…

You cannot use Transform Rules to rewrite the hostname.

Transform Rules allow you to adjust the URI path, query string, and HTTP headers of requests and responses on the Cloudflare global network. Transform Rules · Cloudflare Rules docs

If you are on an Enterprise Plan, you can change the host header with Origin Rules (beta) Origin Rules · Cloudflare Rules docs.

If you are OK with a redirect (as opposed to a rewrite), you can use Redirect Rules (beta). Only Business or Enterprise plan can use the operator “matches regex”. If your plan is Free or Pro, you’d need to combine different operators (is in, is not in, contains etc.) to arrive at your desired redirect behavior.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.