homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Social Media / Facebook Marketing
Forum Library, Charter, Moderators: httpwebwitch & not2easy

Facebook Marketing Forum

Like Button SSL Error

5+ Year Member

Msg#: 4331756 posted 8:42 pm on Jun 27, 2011 (gmt 0)

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?



5+ Year Member

Msg#: 4331756 posted 1:35 am on Jun 28, 2011 (gmt 0)

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.


5+ Year Member

Msg#: 4331756 posted 1:36 am on Jun 28, 2011 (gmt 0)

Obviously only works on PHP pages though....


WebmasterWorld Senior Member

Msg#: 4331756 posted 2:24 am on Jun 28, 2011 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Social Media / Facebook Marketing
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved