TP5.1隐藏public/index.php第二种方式

 复制public下的index.php和htaccess文件到根目录php

index.php文件直接引入public/index,php便可iview

htaccess文件须要修改code

/*
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>
相关文章
相关标签/搜索