TP5.1隐藏public和index.php

1.将public下的index.php和htaccess文件移到根目录下php

2.修改index.php文件iview

注意这里,须要修改code

3.修改htaccess文件it

/*
author:咔咔
wechat:fangkangfk
*/
<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>

访问路径:io