ThinkPHP5访问去除/public/index.php
生活随笔
收集整理的這篇文章主要介紹了
ThinkPHP5访问去除/public/index.php
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
原訪問鏈接:http://localhost/public/index.php/admin/index/index
設置后訪問鏈接:http://localhost/admin/index/index
一、復制public目錄下的index.php到根目錄
修改內容為:
二、在根目錄新建.htaccess文件
文件內容:
<IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L] </IfModule>總結
以上是生活随笔為你收集整理的ThinkPHP5访问去除/public/index.php的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html中相同结构标签怎么区分,html
- 下一篇: IM即时通讯结合mui 环信