no-www dynamic redirect
no-www dynamic redirect
to redirect from www. to the non-www host using dynamic redirects instead of page rules:
- create a new dynamic redirect rule
- When incoming requests match… click the edit expression box and paste the following (your www. hostname)
(http.host eq "www.example.com")- Then… select Dynamic as the redirect Type the following expression and 301 as the Status Code
concat("https://example.com", http.request.uri)- you can also tick the box Preserve query string