All,
Here is how I used Apache and the Config.php file to rewrite the URLs so as not to trigger 'non-SSL content warnings' from browsers. I'm still using the {path} and {stylesheet} variables in my templates because they're just too good to pass up :)
In Apache's htaccess file:
# Set an Apache 'site_url' variable to http when accessed via http:
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ - [E=site_url:http://mysite.com]
# Set Apache 'site_url' variable to https when accessed via https
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ - [E=site_url:https://mysite.com]
Then in system/expressionengine/config.php
Add the following two lines to your code (make sure you haven't set these variables elsewhere in the config file)
$config['base_url'] = $_SERVER["site_url"];
$config['site_url'] = $_SERVER["site_url"];
As I understand it, the site_url variable is what EE uses to for {stylesheets} and {paths} in EE.
The proverbial 'One last thing':
If you're still getting the non-SSL warning, just view source and search for 'http://' in your source. These are the culprits. They're are hard coded links that are not being set with the base_url/site_url variables.
You'll need to locate those http calls in your posts/templates/variables/snippets and replace those calls with a simple //.
So a call to
http://example.com/some_file.html
should now look like this:
//example.com/some_file.html.
This works for absolute and relative URLs.
This is also true for the path you set to the EE file upload directories. Makes sure change the url of those directories to look like this
//example.com/path/to/your/upload/directory
And voila, you should be good to go :)