1. 程式人生 > >Apache配置.htaccess檔案 ,http自動轉https,隱藏index.php

Apache配置.htaccess檔案 ,http自動轉https,隱藏index.php

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

RewriteBase /
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^.* https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

</IfModule>