2015-09-28 26 views

回答

1

這就是nginx的標準regex named captures特點:

如:

有了這個位置:

location ~ /numbers/(?<num>\d+) { 
# I captured one ore more digits into the variable $num  
    ... 
} 

如果請求/數字/ 100

變量$ NUM(價值100)在您的l ocation。