nginx 匹配动态地址规则怎么写

查看 40|回复 1
作者:llcn168   
像这种动态地址在nginx配置里面应该怎么匹配
/read.php?aid=1&cid=2
[ol]location ~ .*read.php\?aid\=([0-9]+)\&cid\=([0-9]+)
{
        fastcgi_pass unix:/tmp/php-cgi-73.sock;
        include enable-php-73.conf;
        add_header Nginx-Cache "$upstream_cache_status";
        fastcgi_cache cgi_one;
        fastcgi_cache_valid 200 301 302 1d;
        fastcgi_cache_valid 404 500 502 503 504 0s;
        fastcgi_cache_valid any 0s;
}[/ol]复制代码
这样好像匹配不到
来个大佬指导下

大佬, 地址, 动态

greencloudvps   
问chatgpt

DMIT CN2GIA || DMIT 交流群 || 以针会友
您需要登录后才可以回帖 登录 | 立即注册

返回顶部