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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.