• 请不要在回答技术问题时复制粘贴 AI 生成的内容
c00WKmdje2wZLrSI
V2EX  ›  程序员

请教 rewrite 的写法

  •  
  •   c00WKmdje2wZLrSI · Sep 17, 2018 · 2713 views
    This topic created in 2810 days ago, the information mentioned may be changed or developed.

    搭了个乌云的镜像站,然后图片是外链的,但是现在外链挂了,于是我就把保存的图片传到 oss 上面,rewrite 一下,但是一直不成功,不知道哪里错了

    iZUqFe.png

    rewrite http://static.loner.fm/upload/(.*?)jpg$ https://xxxx.oss-cn-hangzhou.aliyuncs.com/$1jpg;

    重启 nginx 后未发现错误,重新访问页面后,还是访问原来的图片外链,没有跳转,是哪里写错了?

    4 replies    2018-09-17 19:35:52 +08:00
    wlsnx
        1
    wlsnx  
       Sep 17, 2018
    c00WKmdje2wZLrSI
        2
    c00WKmdje2wZLrSI  
    OP
       Sep 17, 2018
    @wlsnx rewrite /upload/(.*?)jpg$ https://xxxx.oss-cn-hangzhou.aliyuncs.com/$1jpg;
    还是没跳转
    roadli
        3
    roadli  
       Sep 17, 2018
    因为这请求都根本发不到你服务器上啊 static.loner.fm. 7200 IN A 139.196.166.156
    c00WKmdje2wZLrSI
        4
    c00WKmdje2wZLrSI  
    OP
       Sep 17, 2018
    @roadli 哦.....原来是这样......
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1023 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 22:33 · PVG 06:33 · LAX 15:33 · JFK 18:33
    ♥ Do have faith in what you're doing.