首页 新闻 会员 周边

IIS 配置 URL 映射物理地址

0
悬赏园豆:50 [待解决问题]

假设有 URL:
https://a.com/2.0.0.0/article/10.1/zh-CN/a.json
希望映射到的物理地址是:
c:/program/2.0/a.json

有URL:
https://a.com/2.1.0.0/blog/11/zh-CN/b.json
希望映射到的物理地址是:
c:/program/2.1/b.json,按照以上的规律进行映射。

如果是 Nginx 或者 Apache,可以很好配置,Nginx 是:

location ~ ^/(\d\d?\.\d\d?).+/(.+\.json)$ {
    try_files $uri /program/$1/$2;
}

Apache 可以是:

AliasMatch ^/(\d\d?\.\d\d?).+/(.+\.json)$  C:/program/$1/$2
<Directory "C:/program">
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>

有没有大侠知道 IIS 应该怎么配置,先谢过了。

IIS
nemo20的主页 nemo20 | 初学一级 | 园豆:120
提问于:2019-11-28 16:28
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册