以nginx为例 在vhost.conf中添加
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14# nginx configuration location /manage { if (!-e $request_filename){ rewrite ^/manage(.*)$ /admin.php$1 last; } } location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; } }
以apache为例 在.htaccess添加
#请求的文件或路径是不存在的,如果文件或路径存在将返回已经存在的文件或路径
复制代码
1
2
3
4RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php
最后
以上就是负责月光最近收集整理的关于隐藏入口文件的全部内容,更多相关隐藏入口文件内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复