thinkphp5 关于入口文件失败的解决方法

转载自:http://blog.csdn.net/qq_36370731/article/details/72084031

在使用thinkphp5时被入口文件坑的满口苦水啊,需要配置一下Apache中的部分参数,下面是方法:

第一步:修改apache配置

1、找到apache下的httpd.conf配置文件

2、找到rewrite_module modules/mod_rewrite.so 去掉前面的注释

3、在配置文件中, AllowOverride None 将 None 全部改为 All

第二步:修改.htaccess文件,内容如下:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On

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



猜你喜欢

转载自blog.csdn.net/qq_37682202/article/details/79398621
今日推荐