a) yes, you will need apache rewrite rules or something to prevent that.
b) Then there is a bug, it should work like with module names, if there is a conflicting module name (as defined by ModuleList setting, witch is required as of 4.1), then url alias for that article is spanish2
The best would of course be to have a match type called hosturi or something, where combination of uri part and hostname decides the siteaccess to use, so you can do:
example.com/es
example.com/de example.com/en
domain.com/es
domain.com/de domain.com/en
We have patches for this (used at a customer install), and I'll try to get that into 4.2.
@Luigi: You can find a cleaned up version of the patch here on my comment: http://issues.ez.no/IssueView.php?Id=15359&activeItem=3#comment262801
It's quite simple and works like you used to from host matching, expect that it also matches url of course. It came up a bit late in the 4.2 development cycle, so currently it is on hold. There is also another patch from Felix there, so it would speed up the process if more people took a look at both and chimed in on the discussion there..
If you look at the issue: http://issues.ez.no/IssueView.php?Id=15359 you'll see that it was implemented for 4.4.0alpha5... meaning it will be part of the core for the next release.
We have been using the patch that is offered in that issue and it works quite well.
Okay, we've upgraded our site so we can use the host_uri MatchOrder, but I can't understand how to use it to implement the above set-up that André has described above. site.ini says "Last optional parameter controls host matching method" but I can't understand what it does. What exactly should I put in site.ini to achieve: