<IfModule mod_rewrite.c> ?Options +FollowSymlinks ?RewriteEngine On#thinkphp去掉index.php ?RewriteCond %{REQUEST_FILENAME} !-d ?RewriteCond %{REQUEST_FILENAME} !-f ?RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] ???#http自动跳转到https ?RewriteCond %{SERVER_PORT} !^443$ ???#只有匹配对应的域名才会跳转 ?RewriteCond %{SERVER_NAME} ^hrsc.cc|www.hrsc.cc$ ?RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]</IfModule>
Apache由http自动跳转到https的方法
原文地址:http://blog.51cto.com/keefe/2069936