I'm trying to build a store with multiple domains, based on the language: for example mysite.com (english), mysite.it (italian), mysite.ru (russian).
I'm following this and this, but i think it could be a non-magento problem.
My apache setup is the following:
<VirtualHost *:80>
ServerName mysite.rb.com
ServerAlias mysite.it
ServerAlias mysite.ru
...
the problem is that if I print to the log the http host, it's always:
[HTTP_HOST] => mysite.com
also if i type mysite.it
or mysite.ru
Am I doing anything wrong with apache? Should i declare another virtual host instead of an alias?
If I can't recognize properly the requested host, I also can't show the correct store.
PS: unsecure and secure base urls have been set to the correct domain name, each one for the proper language
EDIT: now I am sure that it's not an apache problem. I deleted the directory of my project, and apache did not send a 302 redirect. So Magento is handling this redirect by itself
mod_setenvif
is enabled enabled. Not all hosters support this method. – Simon H