Forum Moderators: phranque
I'm not sure if I've really searched all threads for my problem ... I'm sure I'm not the first with this problem, but I didn't find a solution.
I've different virtual hosts:
l1.test.com ... l2.test.com etc and what I want is always a different welcome page in the SAME directory.
If request is l1.test.com, welcome page should be index.html?lang=en in directory /test,
if request is l2.test.com, welcome page should be index.html?lang=fr in directory /test, etc.
Of course, a simple solution is having different directories, but is it possible to define different welcome pages for different virtual hosts?
Welcome to WebmasterWorld!
Yes, you could use mod_rewrite. Use RewriteCond to test the requested subdomain in the {HTTP_HOST} server variable. Then rewrite requests for the welcome page such that the subdomain is used to select the "lang" parameter.
References for mod_rewrite and regular expressions can be found in our forum charter (link near top left of this page).
Jim