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

请教 rewrite 的写法

  •  
  •   c00WKmdje2wZLrSI · Sep 17, 2018 · 3098 views
    This topic created in 2970 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
    wlsnx
    Sep 17, 2018
    1
    c00WKmdje2wZLrSI
    c00WKmdje2wZLrSI
    OP
    Sep 17, 2018
    2
    @wlsnx rewrite /upload/(.*?)jpg$ https://xxxx.oss-cn-hangzhou.aliyuncs.com/$1jpg;
    还是没跳转
    roadli
    roadli
    Sep 17, 2018
    3
    因为这请求都根本发不到你服务器上啊 static.loner.fm. 7200 IN A 139.196.166.156
    c00WKmdje2wZLrSI
    c00WKmdje2wZLrSI
    OP
    Sep 17, 2018
    4
    @roadli 哦.....原来是这样......
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2687 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:41 · PVG 22:41 · LAX 06:41 · JFK 09:41
    ♥ Do have faith in what you're doing.