How can I redirect from a main domain to a subdomain?
How can I redirect from a main domain to a subdomain?
example.com). Set the record to be proxied, which means Cloudflare will handle the traffic. The IP address you enter doesn't matter, as the traffic will be redirected.(lower(http.host) eq "example.com") to match requests to your main domain.concat function to construct the URL, like this: concat("https://","subdomain.example.com",http.request.uri.path). This will redirect requests to your main domain to your subdomain.301, which is a permanent redirect.(lower(http.host) eq "example.com")concat("https://","subdomain.example.com",http.request.uri.path)301This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.
example.com(lower(http.host) eq "example.com")(lower(http.host) eq "example.com")concatconcat("https://","subdomain.example.com",http.request.uri.path)concat("https://","subdomain.example.com",http.request.uri.path)301301