Doubt creating rules for redirect

Hi,
I am configuring some rules to redirect mydomain to mydomain / folder, and that www is added if it does not have it, apart from https.
I know that there must be some simpler way (using fewer rules) than the one I’m using, which is this:


Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

*.mydomain.com/
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

mydomain.com/forum
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

http://mydomain.com/forum
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

I have needed to create 4 rules for it and I have not been able to use / activate the one of always use HTTPS.

I have looked at this guide:

But I cannot shorten the number of rules, I have tried several combinations but so that it always redirects to the forum directory, adding www if it does not have it and with https, I have only known how to do it with these 4.

Any help or advice?

Thanks and regards.

Just a Match of *mydomain.com/ (no period after the *) should do most of it.

Why can’t you enable Always Use HTTPS from SSL/TLS -> Edge Certificates?

Hi!
Thanks a lot for your reply.
Oh, yes, with *mydomain.com/ (no period adter the *) perfect, this was my error, period after the *.

The 4 rules, now are 2, are this:

*mydomain.com/
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

*mydomain.com/forum
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.mydomain.com/forum/)

The second rule I need create for the non www with yes www
Is that I think or I can configure for work.

And yes, about enable Always Use HTTPS from SSL/TLS -> Edge Certificates, I forget this, and I enabled in this moment, work perfect.

Again, thanks a lot for your reply and help!

1 Like

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