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

你可能感兴趣的:(tp5)