Here is my setup
1. Staging server - used for content creation and code development. Used to control admin settings as well
2. Production Server - locked down. The only way code / content (db and files) make it over here is through a script. On every run of the script - (i) the complete DB is recreated (ii) the "cache" tables are emptied and (iii)the "sites" folder is recreated.
Root Problem:
If URL is accessed using https protocol then we see un-secured content warnings. Fix required is to make the site respond without these warnings. (It is rare that the site is requested via https, usually it is requested via http, but we need to cover both scenarios)
Steps taken for fix:
1. Staging server - added preprocess in template.php to handle "https" requests - $variables['scripts'] = str_replace("http://", "/", $variables['scripts']); etc.
Also added - drupal_flush_all_caches(); to template.php if it is a https request.
2. Pushed this change over to production via script - verified that the change is in production copy of template.php
Observation:
1. On staging server - where we have direct access to change settings such as "cache", "theme-registry-rebuid" etc. the fix works. https requests do not show "un-secured content" warnings.
All css files etc. that Drupal builds out now have "https://....." instead of "http://....." - YEAH