我在努力寻找一个位置。我想找到类似于
location ~ /config/<match anything regardless if path, file, or random crap, whether it is there or not> {
"do stuff here"
}
我已经试过所有我能在网上找到的
location /config
location /config/
location ~ ^/config/
location ~ ^/config(.*)/(.*)+$ETCETC!!!!ARGHA
所有尝试都只会导致404错误...
任何帮助都将不胜感激
谢谢
2条答案
按热度按时间pw136qt21#
不带前缀的位置已经是前缀匹配,因此location /config应起作用,而不是location /config/
vfhzx4xs2#
也许试试
~ /config(|/.*)
似乎对我很有效:)