Apache配置.htaccess文件 ,http自动转https,隐藏index.php

版权声明:本文为博主原创文章,若转载请加上此页地址。 https://blog.csdn.net/macwhirr123/article/details/80452403


<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>

猜你喜欢

转载自blog.csdn.net/macwhirr123/article/details/80452403
今日推荐