This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by Bobby 1 month, 2 weeks ago.

Assigned support staff: Bobby.

Author Posts
September 4, 2019 at 4:51 pm #4513033

jiriS-2

I am trying to: switch to the English version

Link to a page where the issue can be seen: hidden link

I expected to see: English version (with URL hidden link)

Instead, I got: Czech version (with URL hidden link)

(I already tried to disable all plugins and with different template)

September 4, 2019 at 7:01 pm #4513773

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

please go to WPML->Languages do you see any errors under the Language URL Format area ?

i have checked your URL and do not see a current redirect on it , please verify that you have fully translated the language and also that there are no pages in the trash area

additionally review your .htaccess for any redirects that might be active

September 4, 2019 at 7:59 pm #4513871

jiriS-2

Hi,

- no errors under the Language URL Format area
- All pages are translated and there are no trash
- in the .htaccess file there is a redirect for SSL:

RewriteEngine On
RewriteCond %{HTTPS} off [NC]
RewriteRule (.*) <em><u>hidden link</u></em>{HTTP_HOST}%{REQUEST_URI} [L,R=301,QSA]

I tested the site without this redirect and it works the same.

Maby I can elaborate on what I have found during troubleshooting this problem:
1) URL hidden link automatically redirects to hidden link
2) this redirection is made by WordPress - these are the headers:

$ GET -Sed smartrotation-skf.com
GET <em><u>hidden link</u></em>
301 Moved Permanently
Connection: close
Date: Tue, 03 Sep 2019 12:22:12 GMT
Location: <em><u>hidden link</u></em>
Server: Apache
Content-Length: 304
Content-Type: text/html; charset=iso-8859-1
Client-Date: Tue, 03 Sep 2019 12:22:09 GMT
Client-Peer: 81.2.195.254:80
Client-Response-Num: 1
Title: 301 Moved Permanently
 
GET <em><u>hidden link</u></em>
301 Moved Permanently
Connection: close
Date: Tue, 03 Sep 2019 12:22:12 GMT
Location: <em><u>hidden link</u></em>
Server: Apache
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Client-Date: Tue, 03 Sep 2019 12:22:09 GMT
Client-Peer: 81.2.195.254:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
Client-SSL-Cert-Subject: /CN=smartrotation.cz
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
X-Powered-By: PHP/7.1.3
X-Redirect-By: WordPress
 
GET <em><u>hidden link</u></em>
200 OK
Connection: close
Date: Tue, 03 Sep 2019 12:22:13 GMT
Server: Apache
Content-Type: text/html; charset=UTF-8
Client-Date: Tue, 03 Sep 2019 12:22:09 GMT
Client-Peer: 81.2.195.254:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
Client-SSL-Cert-Subject: /CN=smartrotation.cz
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Client-Transfer-Encoding: chunked
Link: <<em><u>hidden link</u></em>;; rel="<em><u>hidden link</u></em>", <<em><u>hidden link</u></em>;; rel=shortlink
Title: SKF – smart rotation
X-Meta-Apple-Mobile-Web-App-Capable: yes
X-Meta-Apple-Mobile-Web-App-Title: SKF - smart rotation
X-Meta-Charset: UTF-8
X-Meta-Generator: WordPress 5.1.1
X-Meta-Generator: WPML ver:4.2.7.1 stt:9,1;
X-Meta-Generator: Powered by WPBakery Page Builder - drag and drop page builder for WordPress.
X-Meta-Mobile-Web-App-Capable: yes
X-Meta-Msapplication-TileImage: <em><u>hidden link</u></em>
X-Meta-Viewport: width=device-width, initial-scale=1, shrink-to-fit=no
X-Powered-By: PHP/7.1.3

3)URLs of other pages in english do not have this redirect e.g.:hidden link works fine
4) on other pages in english link to home (from logo) leads to the default language (hidden link) and it should lead to hidden link. Link is made by

href="<?php echo esc_url( home_url( '/' ) ); ?>"
September 5, 2019 at 7:47 am #4516369

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

thank you for updating me !

yes there is a 301 redirect on the URL

hidden link

HTTP/1.1 301 Moved Permanently
Date: Thu, 05 Sep 2019 07:42:33 GMT
Server: Apache
X-Powered-By: PHP/7.1.3
X-Redirect-By: WordPress
Location: hidden link
Content-Length: 0
Content-Type: text/html; charset=UTF-8

if possible please contact your host provider and let me know their feedback as WPML itself would not create a redirection

September 5, 2019 at 9:03 am #4517333

jiriS-2

HI,

I already contacted the hosting provider and he told me that the redirect is made by WordPress and send me the headers as proof. He also told me that this is the standard behavior of WordPress with the alias domain. I am honestly surprised because I am using WML with alias domain on another hosting and there it is working well.

September 5, 2019 at 5:13 pm #4520957

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

i am not sure this is a standard behavior as it works on the sub pages

with WPML deactivated does the redirect remain when you try to visit the secondary domain?

also verify that everything is set up correctly as outlined here
=> https://wpml.org/2016/04/use-wpml-different-domains-per-language/

The topic ‘[Closed] Homepage in different language is redirected to base language’ is closed to new replies.