Page rules - Always use HTTPS and Redirect

Hello, I’m trying to work out how to get page rules to work for our site, we’ve got 2 page rules spare.

We need to enforce https:// on all pages, with or without www. - e.g. and

And we need to redirect all traffic from non-www to www.

I’ve tried the redirect one using * and $1, and it doesn’t seem to work - redirecting to /* actually literally redirects to /* and causes an error message.

The easiest way to do this would be to enable

in the SSL/TLS app.

From this article:

To fix the forwarding from the root to www in the above example, you could use the same pattern:*

You’d then setup the following URL for traffic to forward to:$1

In this case, if someone went to:

They’d be redirected to:

Looks from what you posted above like you got the * and the $1 the wrong way round.

1 Like

Thanks, that’s great, all working now.

1 Like

No problem, glad it’s working for you now.

A post was split to a new topic: Page rule before Always Use HTTPS