PLEASE donate to the Free Software Foundation, the org that wrote the code for emacs, head, sed, tr, ncurses, emacs, parallel, bash, etc., - Their mission is to fight against proprietary software and hardware so that we the people are in control instead of publicly traded massive corporations. PLEASE, CLICK HERE.

Mixed SSL Content Warning Secure Fixed

I used to run into the problem of having warning messages pop up when I accessed a page with secure and non-secure information and finally I found something that let me post non-ssl encrypted content on an ssl encrypted page and no warning messages will pop up!

On on of my secure sites, lets say I wanted to give my visitors the option to post youtube videos and google videos. But then everyone kept seeing the "warning, mixed secure/non-secure content" on a page that had one of these videos.

I basically did a str_replace on all posts text for and to change them to Then I used the following rewrite code:
RewriteEngine On
RewriteBase /
RewriteRule ^htaccess/googleplayer.swf(.*)$$1 [L]
RewriteRule ^htaccess/youtube/(.*)$$1 [L]
and it worked! But one caveat, this wouldn't turn the warning messages off in IE < version 7, so I added some simple HTML to the head of all my pages that only show up for people using IE < version 7.
<!--[if lt IE 7]>
<span id="ie7">Please Upgrade:
<a href="">IE 7!</a>
<a href="">FF!</a></span>
Cool huh! Fix for secure and nonsecure items warning message