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

  • Post author:
  • Post category: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>


版权声明:本文为macwhirr123原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。