NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
letitbesqzr
V2EX  ›  NGINX

nginx 的 sub_filter 如何替换多个关键词

  •  
  •   letitbesqzr · Nov 2, 2014 · 8817 views
    This topic created in 4291 days ago, the information mentioned may be changed or developed.
    用别人反代的谷歌经常让输验证码..准备自己折腾了个..发现谷歌载入图片和一些js用的是
    ssl.gstatic.com 这个域名...

    sub_filter www.google.com google.xxx.cc;
    sub_filter ssl.gstatic.com/gb google.xxx.cc/gb;
    使用两个直接报错了...
    如何正确的同时替换两个?
    8 replies    2014-11-25 09:34:25 +08:00
    letitbesqzr
        1
    letitbesqzr  
    OP
       Nov 2, 2014
    翻了下文档,找到个配置 subs_filter 可以配置多个..
    XiaoxiaoPu
        2
    XiaoxiaoPu  
       Nov 2, 2014
    sub_filter_once off;
    fising
        3
    fising  
       Nov 2, 2014 via iPad
    letitbesqzr
        4
    letitbesqzr  
    OP
       Nov 2, 2014
    @fising https://google.sqzr.cc 搞定了..把ssl.gstatic.com 地址换成七牛云的了..速度块不少/
    declanVox
        5
    declanVox  
       Nov 2, 2014
    @letitbesqzr 请问能帮忙看看这个问题?

    http://v2ex.com/t/143289#reply2
    declanVox
        6
    declanVox  
       Nov 2, 2014
    我点了楼主头像多次,刷了微博多回,发现 v2 没有私信!

    我在微博私信楼主了
    blijf
        7
    blijf  
       Nov 25, 2014
    @fising nginx 0.7貌似不能用 - -
    fising
        8
    fising  
       Nov 25, 2014   ❤️ 1
    @blijf 我安装了,貌似也没有任何作用。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1531 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 16:21 · PVG 00:21 · LAX 09:21 · JFK 12:21
    ♥ Do have faith in what you're doing.