假设我的网站是 asp 的,我能做到除了 asp,html,js,css,jpg,gif 等格式的后缀能访问外,其他后缀的都返回 403 么?
假设我的网站是 asp 的,我能做到除了 asp,html,js,css,jpg,gif 等格式的后缀能访问外,其他后缀的都返回 403 么?
1
guoer Dec 14, 2017 via iPhone 可以的。匹配 location
|
2
mtus Dec 14, 2017 在这里测试 location 规则: [Nginx Location Match Visible]( https://detailyang.github.io/nginx-location-match-visible/)
|
3
yuedingwangji OP @guoer 怎么配置?
|
4
Lax Dec 15, 2017
Nginx 配置方面可以提供付费咨询,有兴趣的话可以在我资料里找到联系方式
|
5
yuedingwangji OP @Lax 价格怎么算
|
8
handwork Dec 15, 2017
location ~ .*\.(php|jsp|do|swf){deny all;}
|
9
dorothyREN Dec 15, 2017
正则匹配,非这几个尾巴的 return 一个 403
|