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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.