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>
相關文章
相關標籤/搜索