September 18, 201312 yr Hi All, I wanted to shared my stupidity incase it was of any use to anyone else. I created a site using HTML and CSS. It worked brilliantly. I also needed to create a secure area for the same site. It used the same appearance as the main site but had sensitive content on it so needed to be secure. I initially decided to use .htaccess but then it became apparent it wasn't secure enough even with an SSL as there was no timeout function for the htaccess. With the help of this forum I was convinced into creating a PHP login system so I could also have a logout feature sor the session. It took me a while and assistance from a friend as I had never worked with PHP but got there in the end. It just so happened that at the same time as setting up the PHP pages I also installed the SSL certificate. When I went to the HTTPS secure side of the site it told me there was mixed content which could be insecure so therefore seemed to strip out some to text styles. I thought it was referring to the php/HTML mix so started looking at how to parse HTML through PHP. While tinkering I realised that the font I used on the page was a google font and appeared on the page like this: <link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css" /> At that point I had a brainwave, add an S to the HTTP so it now looked like this: <link href="https://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css" /> It worked a treat. The page now appears the same on the public side as it does in the secure side. I made the mistake of over thinking it and wanted to share the point that it may be simpler than you think at times. I haven't been doing web design for long so this may appear obvious but it wasn't to me so wanted to share it. Happy Days.
Create an account or sign in to comment