參考地址: http://blog.csdn.net/dong123dddd/article/details/51660368
location /riskcontrol {
root /data;
# 解決訪問riskcontrol不加斜線時無法訪問問題
if ( -d $request_filename ){
rewrite ^/(.*)([^/])$ https://$host/$1$2/ permanent;
}
try_files $uri $uri/ /riskcontrol/index.html;
access_log /app/logs/riskcontrol.log;
}
location /buyloan {
root /data;
# 解決訪問buyloan不加斜線時無法訪問問題
if ( -d $request_filename ){
rewrite ^/(.*)([^/])$ https://$host/$1$2/ permanent;
}
try_files $uri $uri/ /buyloan/index.html;
access_log /app/logs/buyloan.log;
}