账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    IIS 配置 URL 映射物理地址
    64
    0

    假设有 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 应该怎么配置,先谢过了。

    1
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    更多回答
    扫一扫访问手机版