Skip Navigation

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 Rob Coers 1 year, 10 months ago.

Assisted by: Andreas W..

Author Posts
June 1, 2023 at 3:06 pm #13755849

Rob Coers

Hi,
We have four domain names, e.g. telescopicmast.de and i want that this redirects to telescopicmast.com/de For now, my host has made it working to lead to telescopicmast.com

I created this rule in .htaccess

RewriteCond %{HTTP_HOST} ^telescopicmast.de$
RewriteCond %{REQUEST_URI} !^/de/
RewriteRule (.*) /subdir/$1

But as far as I understand, redirecting is only possible with a physical directory /de and this is not the case with WPML.

Is there any other way to make this work?

June 2, 2023 at 10:21 am #13760661

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

With WPML you can only use domains in different languages or languages inside directories, but not both settings at the same time.

A physical directory on the server is not needed for this purpose.

Please read this documentation and let me know if you do have further questions.

https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/

Best regards
Andreas

June 5, 2023 at 7:31 am #13767685

Rob Coers

Hello Andreas,
Thank you for the reply, but the documentation doesn't really give an answer to my question.
As written, i am looking for the right code send a domain name directly to the right language of that domain.
So as an example : telescopicmast.de should open telescopicmast.com/de

Hope you can help.
Rob

June 6, 2023 at 6:52 am #13775377

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Rob,

I am afraid that this is not possible with WPML.

You can use "Directories for languages:

Geman: telescopicmast.de
English: telescopicmast.de/en

Or use different Domains per Language:

Geman: telescopicmast.de
English: telescopicmast.com

You can not use both methods at the same time.

Best regards
Andreas

June 6, 2023 at 8:41 am #13776335

Rob Coers

Oh i managed to make it work with some help of my webhost.
With editing the htaccess file.
Thanks.
Rob