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

请教这段 301 的配置有没有问题, 看返回值没错,百度却总是不生效,快一年了

  •  
  •   ab · Feb 4, 2015 · 3095 views
    This topic created in 4252 days ago, the information mentioned may be changed or developed.
    server {
    server_name a.com b.com c.com;
    return 301 $scheme:/x.com;
    }
    server
    {
    listen 80;
    server_name x.com;
    ...
    }

    由于网站架构不同,为避免太多404,a,b,c三个域名的所有页面都要直接全部重定向到X站首页.

    如有不妥,有其他好一点的写法吗?
    2 replies  •  2015-02-04 22:27:30 +08:00
    ab
        1
    ab  
    OP
       Feb 4, 2015
    nginx
    gs038538
        2
    gs038538  
       Feb 4, 2015
    我的检测状态码返回301.google正常~
    百度一直www和不带www都收录,收录还不一样。
    半年了,郁闷!!!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2578 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 05:45 · PVG 13:45 · LAX 22:45 · JFK 01:45
    ♥ Do have faith in what you're doing.