Jump to content

Is there a way to encapsulate your whole domain with ssl


ndjustin20

Recommended Posts

Greetings!

 

I am wondering if the ssl that I currently have installed in cpanl and centos would be able to encapsulate my entire domain.  For instance, say a person goes to www.mydomainname.com or test.mydomainname.com or www.mydomainname.com/test.php or something like that.  Is there a way to, no matter how they reference the domain, to ensure they reach the https:// site and not the standard http://    ?  I know that you can do this individually using .htaccess by using the following:

 

RewriteEngine On

RewriteCond %{SERVER_PORT} !^443$

RewriteRule ^(.*)$ https://mydomainname.com/$1 [R]

 

but what I am wondering is if there is a way to do this via php or to change a setting inside apache or something so every time you go to mydomainname it will always be the https:// secured site.  I have been looking around though can't seem to figure out how to accomplish this without redirecting each page individually.  Oh...and the ssl cert I have installed is a wildcard cert so it is designed to work with sub domains from the master domain.

 

You guys are awesome,

 

Justin

Ok so that would redirect using php....thank you very much........is there a way to not have to do this for every page though?  I would think that there must be a way to encapsulate your whole domain without having to redirect each instance of the domain while including sub domains.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.