954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

SSL Implementation

Good afternoon,

This may sound like a silly question but could someone explain how to make an SSL certificate work?

I have a website that I completed (almost), and everything works just fine...

Had an SSL certificate installed yesterday, and everything looks exactly the same.

How do you make the entire website come under the SSL and not accessible via

http or just www.???

Shouldn't it be displaying the https://. ....

I am apparently missing something here, and have no idea what it may be.

Thanks in advance.
Douglas

showman13
Junior Poster
153 posts since Feb 2010
Reputation Points: 16
Solved Threads: 2
 

This is going to be setup in your Apache config (I believe). Not exactly sure where it is though sorry :-/

hag++
Junior Poster
197 posts since Jan 2010
Reputation Points: 34
Solved Threads: 31
 
This is going to be setup in your Apache config (I believe). Not exactly sure where it is though sorry :-/

Actually, I ended up finding a very simple solution...

Since I use an included script for the page head on every page on the site, I was able to add a short PHP blurb in that, and it redirects to https for every page as it is loaded...

Here is the code, in case anybody else needs it in the future...

// If page requires SSL, and we're not in SSL mode,
// redirect to the SSL version of the page
if($_SERVER['SERVER_PORT'] != 443) {
   header("HTTP/1.1 301 Moved Permanently");
   header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
   exit();
}
showman13
Junior Poster
153 posts since Feb 2010
Reputation Points: 16
Solved Threads: 2
 

I've been hassling with SSL stuff, putting it off since last October. I've been getting by with this: https://breeze.websitewelcome.com/~nichecha/subdirectory/indexfile.php?id=17
But you have to use complete URL addresses for images to make it work right.

I was going to get hosting with one of those wildcard certificates for $100.00 plus $24 for the dedicated IP plus $150 or whatever hosting you get for a year.

But then I found out the Business plan at Hostgator includes a private SSL Certificate with dedicated IP for $11.22/month so I'm trying that first. I mainly want to find out whether that includes unlimited sub-domains [www] or just the domain only.

BTW - Thanks for that code - I'm going to try it out on pages where the absolute URL isn't there. Thanks again!

thriftgirl62
Light Poster
26 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

You can do this with a .htaccess rule . Then there's no need to add it to every PHP page you have.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You