【问题标题】:How to redirect a domain to different server's subdomain?如何将域重定向到不同服务器的子域?
【发布时间】:2015-05-29 16:16:54
【问题描述】:

之前可能会问过这个问题或相关问题,但我需要正确完成这个问题。所以让我解释一下我想要什么; 1- 我创建并设计了一个我自己的服务器子域的 wordpress 项目(例如:xyz.proje.com)

2- 我有一个购买了不同公司的域(例如:www.xyz.com)。

3- 项目将保留我自己的服务器,但域需要重定向此子域。

那么我怎样才能正确地做到这一点?如何在这个项目中更改所有 xyz.proje.com(和子页面等)链接到 www.xyz.com? 谢谢。

【问题讨论】:

    标签: wordpress .htaccess redirect dns


    【解决方案1】:

    你在 wordpress 中检查过 Create A Network 吗?

    或编辑 apache Virtual Host?

        Listen 80
    <VirtualHost *:80>
            DocumentRoot /www/mainsite
            ServerName www.example.com
    
            # Other directives here
        </VirtualHost>
    
        <VirtualHost *:80>
            DocumentRoot /www/subdomain1
            ServerName subdomain1.example.com
    
            # Other directives here
        </VirtualHost>
    
        <VirtualHost *:80>
            DocumentRoot /www/subdomain2
            ServerName subdomain2.example.org
    
            # Other directives here
        </VirtualHost>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-10
      • 2011-05-22
      • 2012-11-12
      • 2018-08-26
      • 1970-01-01
      • 2014-04-24
      • 2020-01-20
      • 1970-01-01
      相关资源
      最近更新 更多