Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch & not2easy

Message Too Old, No Replies

Like Button SSL Error



8:42 pm on Jun 27, 2011 (gmt 0)

10+ Year Member

I've looked and looked but still can't seem to solve this issue. When a customer logs into the SSL side of the cart they get an error due to the little Facebook "F" in the like button. I've tried adding the "https" to the url in the iframe code and even eliminating it and going with just "//" as someone suggested. Still gets the same "parts of page not secure" warning. Is there an easy fix to this I'm simply missing?


1:35 am on Jun 28, 2011 (gmt 0)

10+ Year Member

Actually found this on another site finally. It took me a while to find it so I'm posting my solution in case other people are having the same problem. Maybe I'm just slow....

when I want external http content to disappear on https pages I enclose the external content like this:

PHP Code:
<?php if (!$_SERVER['HTTPS']){ ?>
<!-- external content here -->
<?php } ?>

I use this code to display social bookmarking widgets only on http pages and not on https pages.

This works to get rid of the error by removing the button on secure pages completely.


1:36 am on Jun 28, 2011 (gmt 0)

10+ Year Member

Obviously only works on PHP pages though....


2:24 am on Jun 28, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

Well to add to your solution, it'll work on any page including vanilla .htm or .html by simply adding this line to the beginning of an .htaccess file or in the apache .conf file:

AddType application/x-httpd-php .htm .html

That tells Apache to parse for PHP scripting within documents with that file extension.

Featured Threads

Hot Threads This Week

Hot Threads This Month