3 tips to redirect http to https
Blogs20112011-05-25
(1) to setup, either in webserver’s config files, such as httpd.conf, conf.d/domains_ssl.conf, or in $HOME/.htaccess. The following is set in $HOME/.htaccess which is convenient:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}(2) In PHP scripts, if there are http links to download .js or .css, be sure to replace it from https or locally. Otherwise it won’t work in IE. e.g. from:
http://www.google.com/jsapi
google.load("jquery", "1.4.2");
http://bp.yahooapis.com/2.4.21/browserplus-min.jsTo:
<script language="javascript" type="text/javascript" src="jquery-1.4.2.min.js">Â /script>
<script language="javascript" type="text/javascript" src="browserplus-min.js">Â /script>To do so, try to download the js codes locally, then do the inclusion.
(3) Version compatiable. The application uses jQuery 1.4.2 to do the developing, then use jQuery 1.5.1 to deploy. However, under the verion of 1.5.1, some .js plugins don’t work. I had to change back to jQuery 1.4.2.
After the above modification, the app is now available by using https.
