配置一:
XML
location = /ty {
return 301 /ty/;
}
location ^~ /ty/ {
alias /export/server/tianyu/h5/;
index index.html;
try_files $uri $uri/ /ty/index.html;
}
配置二:
XML
location /ty {
root /export/server/tianyu/h5/;
index index.html index.htm;
try_files $uri $uri/ =404;
}
对比:
