网页隐藏index.php的方法:1、找到网站的配置文件;2、添加“rewrite ^/(.*)$ /index.php/$1 last;”内容即可。
本文操作环境:Windows7系统、宝塔面板7.4.0版、Dell G3电脑。
网页怎么隐藏index.php?
服务端隐藏index.php的方法!!!宝塔面板
1.找到网站的配置文件
2.复制此代码即可
location / {
if (!-e $request_filename) {
#一级目录
rewrite ^/(.*)$ /index.php/$1 last;
}
}