1. 程式人生 > >Apache伺服器下無法隱藏tp5的入口檔案index.php

Apache伺服器下無法隱藏tp5的入口檔案index.php

找到Wampserver伺服器檔案httpd.conf

  1. 去掉‘#LoadModule rewrite_module modules/mod_rewrite.so’前面的‘#’ 。
  2. 查詢AllowOverride 。
<Directory "E:/wamp/bin/apache/apache2.4.9/cgi-bin">
        AllowOverride None
        Options None
        Require all granted
</Directory>

替換為:

<Directory "E:/wamp/bin/apache/apache2.4.9/cgi-bin"
> AllowOverride all Options None Require all granted </Directory>

重啟Wampserver