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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Tirane (GMT+02:00)

This topic contains 1 reply, has 2 voices.

Last updated by Marsel Nikolli 10 months, 2 weeks ago.

Assisted by: Marsel Nikolli.

Author Posts
August 23, 2024 at 3:02 pm #16098944

robinK-16

Background of the issue:
In my .htaccess I've tried redirecting my shop.ecodor.fr subdomain to the main domain: ecodor.fr. I've done this with the following script:

# This will redirect a subdomain to another domain (Alle ecodors redirects)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^shop.ecodor.fr$ [NC]
RewriteRule ^(.*)$ hidden link [L,R=301]

This should work. But I find it keeps redirecting me to ecodor.nl instead. I think this has something to do with WPML and the way that ecodor.fr is now an ALIAS of ecodor.nl.

I've also tried the following redirect but it does exactly the same: Redirect 301 shop.ecodor.fr hidden link

Symptoms:
The subdomain shop.ecodor.fr redirects to ecodor.nl instead of ecodor.fr.

Questions:
Have you had this issue previously?
What would be the solution for this?

August 23, 2024 at 3:36 pm #16099066

Marsel Nikolli

Hi,

Thank you for contacting WPML Support, I will gladly help you.

Please try clearing the website's cache (server-side included) and check if the issue persists.

As stated in our documentation:
When using sub-domains: I want to add the “de.example.com” subdomain to my “example.com” subdomain. It should point to the same location as the main domain.

Your sub-domain might be ignoring the .htaccess rules because the ecodor.nl domain is the main domain language (please confirm that).

You can try using the Redirection plugin and check if that helps.

Let me know how if that helps,
Marsel

The topic ‘[Closed] Subdomain redirection not working’ is closed to new replies.