Question

So I have a client who wants to have a multilingual web site that can be accessed by 2 domain names:

domain_name_1.ru

domain_name_2.ee (default)

The client doesn't want to log in and out every time he/she needs to create content for both sites. The site itself is running on WordPress and right now the russian version of the site can be viewed by typing in:

domain_name_2.ee/ru

NB! the domain names are hosted at 2 different web hosts.

domain_name_1.ru web hosts only options are 1) to redirect the domain 2) to change name servers


Because of this, I'd like to know if it is possible to run both sites on 1 WordPress install and by using .htaccess can the domain name domain_name_2.ee/ru be masked to domain_name_1.ru when the user visits the site?

Was it helpful?

Solution 2

I managed to redirect and keep domain_name_1.ru in the the address-bar by going to the host and creating an alias for it. Here is a list of my steps:

  • created an alias for domain_name_1.ru
  • created a sub domain of ru.domain_name_2.ee
  • installed WP at htdocs directory
  • enabled MultiSite
  • created the MS network
  • made the necessary MS changes to wp-config and .htaccess files in the htdocs directory
  • made changes to the name servers by creating a wildcard (*) A/AAA record with redirect to the IP address
  • created a new site with a domain name of domain_name_1.ru in WP MS.

OTHER TIPS

The way you want to do this is setup the domain_name_1.ru domain to use the domain_name_2.ee/ru directory as its document root (can do this using virtual host and the DocumentRoot directive). Otherwise you'll have to use mod_proxy, and ensure that it's loaded, and reverse proxy the request to the other domain:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain_name_1\.ru$ [NC]
RewriteRule ^(.*)$ http://domain_name_2.ee/ru/$1 [L,P]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top