plqws
V2EX  ›  问与答

CDN 中修改网页源代码中的静态资源地址一般是怎么实现的

  •  
  •   plqws · Jul 4, 2015 · 2094 views
    This topic created in 4051 days ago, the information mentioned may be changed or developed.
    最近在做个项目需要把图片自动转存到又拍云,用了它的镜像功能,所以如果在nginx或者squid那里直接把html中的图片地址改到又拍云的地址,要怎么实现?
    2 replies    2015-07-04 13:31:09 +08:00
    decken
        1
    decken  
       Jul 4, 2015 via Android
    正则替换 要第三方模块支持 模块名忘记了
    ryd994
        2
    ryd994  
       Jul 4, 2015   ❤️ 3
    @decken https://github.com/yaoweibin/ngx_http_substitutions_filter_module
    需要自己重编译,建议参照各发行版里关于patch rebuild二进制包(deb、rpm)的说明,不要直接make一下随便扔
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   920 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:29 · PVG 03:29 · LAX 12:29 · JFK 15:29
    ♥ Do have faith in what you're doing.