Forum Discussion

JeffK_42336's avatar
JeffK_42336
Icon for Nimbostratus rankNimbostratus
Oct 22, 2007

Redirect to www rule

I want to set up a rule so that when someone types in https://testsite.com/ they will be redirected to https://www.testsite.com/

 

 

(where "testsite" is, the url could be any website that we are hosting, that uses SSL)

 

 

We want to have the redirect because of "The name on the security certificate is invalid or does not match the name of the site" message users are getting when they don't type in the full url.

 

 

So far I have set up this rule-

 

 

redirect to "https://www.%h/%u"

 

 

The only problem with that is it will add www to any address you type in, so if a user types in https://www.anysite.com/ they are redirected to https://www.www.anysite.com which does not exist.

 

 

Can anyone help so that if they type in a www the rule isn't adding an extra www? I'm assuming it should be an "If/Then" statement, but I'm not sure what it would be.

 

 

Thanks in advance for any help!

 

Jeff