php - 所有不存在的文件和文件夹重定向,带有 php 扩展名的文件和文件夹除外
问题描述
我对我的应用程序使用以下指令:
location / {
root "C:/Program Files (x86)/EasyPHP-Devserver-17/eds-www";
index index.php index.html index.htm;
autoindex on;
try_files $uri $uri/ /index.php?param=$uri;
}
它将所有不存在的文件和文件夹重定向到 index.php 与 url 的 $_GET 参数,除了我得到以下错误的 php 文件:
未指定输入文件。
有没有一种解决方法可以使用 .php 扩展名进行这项工作?
解决方案
推荐阅读
- html - HTML“升级不安全请求”中的错误
- vue.js - Axios API 调用未能将完整的数组响应保存到变量中
- android - 当条件多个布局应用于单个活动时管理单个数据绑定对象
- javascript - 自动播放带有 cookie 状态的音频播放器。快完成了,需要代码帮助来完成
- android - 当我的应用程序处于调试状态时,一个好的做法是否有一个不检查安全问题的参数?
- sql - SQL json_array_get - 搜索对象而不是位置
- bash - 当我重新安装 postgresql helm 图表时,我的数据库不断被删除
- symfony5 - 创建一个服务只是为了帮助您的测试?
- php - Monolog : 大文件加载问题
- installation - 你如何构建所有的 LLVM?