2

Cloudflare has recently introduced so-called transformation rules, with a limit of 10 rules per free account. They offer greater flexibility than redirect rules, and importantly they do not impact HSTS as they kick in after the connection is upgraded to SSL (unlike redirect rules which cause issues with HSTS). Regex support is particularly welcome.

I wonder whether it's possible to create a rule that would rewrite (or redirect) the URLs in the following manner:

https://$1.example.$2

where

$1 is one of "calendar", "drive", "groups", "mail", and "sites", and
$2 is one of "com", "net", and "org"

is rewritten or redirects to:

https://$1.google.com/a/example.$2 

The purpose is to replicate the handy functionality of Google Workspace which allows its core services to be accessed using subdomains to custom domain (http://calendar.example.com, etc.). Unfortunately, Google's solution does not work with SSL connections; hence this question.

3
  • What issues have you seen with redirects and HSTS? Many types of redirects work just fine with HSTS. Commented Jul 14, 2022 at 18:59
  • Workspace system doesn't work with SSL, which breaks HSTS. For HSTS to work with redirect rules and Workspace, I need to disable CF proxying of subdomains. Also, only three rules are allowed per domain in free accounts.
    – kashmiri
    Commented Jul 14, 2022 at 19:02
  • 1
    The tag used here for Google Workspace is google-apps. (I just made an edit suggestion)
    – Rubén
    Commented Mar 29, 2023 at 3:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.