Jump to https for http
step one:
Open httpd.conf and uncomment LoadModule rewrite_module modules/mod_rewrite.so
Step 2:
Finally, the solution is to add the following configuration to the VirtualHost node:
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R]
E.g:
Reference: http://blog.csdn.net/the_victory/article/details/51006167