I must create a multi-language website.
In order to achieve this aim, I want to point subdomain representing a language to the 1rst URL parameter (GET variable) of the domain in my virtualhost
or htaccess
configuration.
The scheme is the follow :
example.com => /
([a-z-]+).example.com => /?lang=$1
([a-z-]+).example.com/directory1/ => /directory1/?lang=$1
([a-z-]+).example.com/directory1/page.html => /directory1/page.html?lang=$1
etc... whatever the number of directories and pages.
So, according to this scheme :
en-en.example.com matches /?lang=en-en
en-en.example.com/directory1/ matches /directory1/?lang=en-en
en-en.example.com/directory1/page.html matches /directory1/page.html?lang=en-en
etc... whatever the number of directories and pages.
So how can I do that in my apache configuration?