V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yunjob
V2EX  ›  问与答

wordpress 给独立页面绑定二级域名

  •  
  •   yunjob · 2016-01-02 15:37:48 +08:00 · 3987 次点击
    这是一个创建于 3034 天前的主题,其中的信息可能已经有所发展或是发生改变。
    环境: LNMP(CentOS 、 Nginx 、 MySQL 、 PHP)
    模板: Wordpress4.4

    网址: http://www.ponote.com
    新做了一个导航页面(新建的 page.php 模板): http://www.ponote.com/hao
    想要在该导航页面绑定 http://hao.ponote.com 二级域名,请问该如何操作

    现在用 nginx 伪静态做了跳转,但 http://hao.ponote.com 跳转到 http://www.ponote.com/hao 之后,还是显示为 http://www.ponote.com/hao ,怎么才能跳转后显示 http://hao.ponote.com

    rewrite:
    listen 80;
    server_name hao.ponote.com;
    index index.html index.htm index.php default.html default.htm default.php;
    root /home/wwwroot/ponote;
    rewrite ^/ http://www.ponote.com/hao;
    5 条回复    2016-01-03 01:14:17 +08:00
    Daddy
        1
    Daddy  
       2016-01-02 15:48:42 +08:00 via Android
    为什么不先找插件?我记得有分类页面转二级域名
    Pixel
        2
    Pixel  
       2016-01-02 16:08:20 +08:00
    关注过这个网站。界面看起来是 wordpress 之前国内一款老版的 XIU 主题~
    arnofeng
        3
    arnofeng  
       2016-01-02 17:26:27 +08:00 via Android
    你需要反代。
    tammy
        4
    tammy  
       2016-01-03 00:16:22 +08:00
    r#3 @arnofeng 同,看到的同事马上想到反代够快够渐变,这类绑域名的通杀
    yylzcom
        5
    yylzcom  
       2016-01-03 01:14:17 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5737 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 02:44 · PVG 10:44 · LAX 19:44 · JFK 22:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.