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?
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.