wordpress wpml configuration

Here is a feedback about an experience with support from hosting which is said as "Worpdress specialist hoster". Aim :

 Issue :

The url https://www.domaine2.com redirects toward https://www.domaine1.com instead of providing the english content. Wpml is well configured, so we open a case with the hosting, in order to check if there is some conflict or any other problem with SSL / root document / domains.

First answer :

This made me check the Wordpress installation URL set in the database and I noticed the URL is set to https://www.domaine1.com
 Also both of the domains are sharing the same root folder and since Wordpress is domain dependent application the loaded URL in the address bar would be the URL set in the respective database.
In order to resolve this issue I would suggest to clone the Wordpress instalation set it with different database and correct URL.

Well.... unfortunatley, the answer is not really matching the question... If Wordpress is a based url system, in our case, we have a plugin - WPML - to manage 2 domains with same web, without cloning it !!! So we do explain to support the exact configuration we have, and specifying that each URL is with SSL.

Second answer :

Unfortunately, such configuration is not possible on our shared servers, and two addon domains with SSL certificate can not share the same root folder and work completely independent

ok, so shared hosting do not allow to have 2 SSL domains linked with same document root (website) !!!! A little bit suprised, we desactivate the httpS on domain2, keeping the domain1 under SSL, but then, redirection is still here !

Third answer, the classical :

You can use a plugin for Multisite domain mapping like this one. Alternatively, you can contact a professional developer to look into the specific configuration of your website and further assist you as such development issues are beyond the scope of our support.

So the host offers me a solution that does not correspond to what I need, and then they refer to the develop.

:(

Now, keeping to search on the website's backend, I see a plugin specific to the host, to manage the cache, and ...  FORCE THE HTTPS !

So I disabled this plugin and there is no more redirection! I can even use the httpS on both domain names again! On the other hand, if I want to force the https, I have to manually modify the .htaccess to put rules of redirection:

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} =mondomaine1.com [OR]
RewriteCond %{SERVER_NAME} =www.mondomaine1.com
RewriteRule ^ https://www.mondomaine1.com%{REQUEST_URI} [END,NE,R=permanent]

RewriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} =mondomaine2.com [OR]
RewriteCond %{SERVER_NAME} =www.mondomaine2.com
RewriteRule ^ https://www.mondomaine2.com%{REQUEST_URI} [END,NE,R=permanent] 

To conclude 

2 conclusions  :

  1. The plugin developed by the host does not know how to manage the multi domain. It forces the httpS by returning on the main domain name, bypassing the multilingual configuration!
  2. The support we had nevertheless indicated that the management of multi domain httpS on the same site was not possible!

>> For a wordpress specialist web host, its support has brought more problems than solutions. That's why we manage websites AND hosting, to bring you the right solutions and quickly!

 

Contactez-nous

Téléphone
+34 658 095 971
Mail
contact@alcanix.net
Adresse
Barcelona

Agence digitale à Barcelone

Nous vous fournissons les outils pour la création de votre site internet en français à Barcelone

Support en Français

En plus de l'espagnol ou de l'anglais, nous vous aidons dans votre langue afin d'optimiser votre temps

Création de votre site

Nous parlerons ensemble de votre projet dans votre langue pour une meilleure compréhension de vos besoins