tp框架隐藏入口文件
Apache
Options +FollowSymlinks -Multiviews
RewriteEngine On
DirectoryIndex index.php index.html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/\ [QSA,PT,L]
nginx
location / { // …..省略部分代码
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/\ last;
break;
}
}
Buy me a cup of coffee 🙂
觉得对你有帮助,就给我打赏吧,谢谢! 微信赞赏码链接,点击跳转: