nginx配置中的 try_files 方法详解
try_files $uri $uri/ /index.php$is_args$args
假设你防问 https://viphper.com/demo
1.$uri:查找/demo文件
2.$ui/:查找/demo文件夹
3./index.php$is_args$args:将请求传递给/index.php$is_args$args
备注:
$is_args
表示请求中的URL是否带参数,如果带参数,$is_args值为”?”。如果不带参数,则是空字符串
例如:https://viphper.com/about?a=10此时$is_args值为”?”
又如:https://viphper.com/about/a=10此时$is_args值为””
$args
HTTP请求中的参数
例如:https://viphper.com/about?a=10此时$args值为a=10
相关推荐
-
PHP数据类型与常量2025-04-22 01:13:40
-
MySQL 中的反斜杠 \\,真是太坑了2025-04-21 01:42:45
-
mysql修改主键为自增 ,如果自增达到最大值,新增加数据会怎样?
mysql修改主键为自增 ,如果自增达到最大值,新增加数据会怎样?2025-04-21 01:31:46 -
Nginx学习笔记 autoindex on2025-04-21 00:26:47
-
.MySQL中的BETWEEN(在某个范围)2025-04-21 00:04:20