How to hide index.php on web pages

藏色散人
Release: 2023-03-14 18:08:01
Original
3229 people have browsed it

网页隐藏index.php的方法:1、找到网站的配置文件;2、添加“rewrite ^/(.*)$ /index.php/$1 last;”内容即可。

How to hide index.php on web pages

本文操作环境:Windows7系统、宝塔面板7.4.0版、Dell G3电脑。

网页怎么隐藏index.php?

服务端隐藏index.php的方法!!!宝塔面板

1.找到网站的配置文件

How to hide index.php on web pages

2.复制此代码即可

location / { if (!-e $request_filename) { #一级目录 rewrite ^/(.*)$ /index.php/$1 last; } }
Copy after login

推荐学习:《PHP视频教程

The above is the detailed content of How to hide index.php on web pages. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!