概述
以nginx为例 在vhost.conf中添加
# 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添加
#请求的文件或路径是不存在的,如果文件或路径存在将返回已经存在的文件或路径
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
最后
以上就是负责月光为你收集整理的隐藏入口文件的全部内容,希望文章能够帮你解决隐藏入口文件所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复