I have a multilanguage website. The main language is English and the second language is Spanish.
I need to have all the traffic using this domains:
- English domain: www.example.com
- Spanish domain: es.example.com
If I use the .htaccess rules from Drupal, I can redirect all the traffic to www, but it includes the Spanish traffic too. Or I can remove www to use es.example.com, but again, it would redirect the English traffic to use example.com (without www).
I have tried a lot of .htaccess combinations but I finish in a worst situation that is redirecting the Spanish traffic to the Encglish URL, so... I need to know what rules can I use to have these redirections:
- example.com to www.example.com
- www.es.example.com to es.example.com