tp5,thinkphp5,隐藏index.php,隐藏入口文件
生活随笔
收集整理的這篇文章主要介紹了
tp5,thinkphp5,隐藏index.php,隐藏入口文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、找到/public/.htaccess文件
Apache:
<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>phpstudy:
<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] </IfModule>Nginx(在Nginx.conf中添加):
location / { // …..省略部分代碼if (!-e $request_filename) {rewrite ^(.*)$ /index.php?s=/$1 last;break;} }?
轉載于:https://www.cnblogs.com/fan-bk/p/8532096.html
總結
以上是生活随笔為你收集整理的tp5,thinkphp5,隐藏index.php,隐藏入口文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Sersync实现触发式文件同步
- 下一篇: JavaWeb学习总结(六)—HttpS