Hi,
I have a - what I think strange - virtual host problem. I do have a web
server set up that uses ssl. Now I want to reroute the incoming requests to
the
https://. In order to do so I used Rewrite. My virtual hosts are
configured somehow like that:
<VirtualHost
www.name1.tld1:80>
ServerName
www.name1.tld1
RewriteCond {SERVER_PORT} ^80$
RewriteRule /.*
https://%{SERVER_NAME}/$1
</VirtualHost>
This seems to work - except for one thing. I do have several top level
domain names for different countries (e.g. tld1 = .com, tld2 = .ch) and I
still want to distinguish the origin of the request based on the domain it
came from, in order to customize the pages.
Even though I do have several virtual hosts set up it accesses always the
firt one if the top level domain differs but the domain name is the same
(e.g.
www.name1.tld1 and
www.name1.tld2). Once it accesses the first
virtual host it sets the server name to the one named for the first virtual
host, even though the request came from a different domain name.
Well, it doesn't enter the first virtual host configuration if the url has a
different name (e.g.
www.name2.tld1)
Hope you understand what I try to describe.
Thanks in advance for all your help.
david