views:

49

answers:

3

My symfony app should get user's language from subdomain:

en.project.com - for english fr.project.com - for french

and so on... Special filter get 'GET' param 'lang' from current uri and save it in user attribute. How can I setup apache virtual host config for multiple subdomains?

A: 

You'll need simply to rewrite wildcard domain using mod_rewrite, and when you'll have subdomain as a parameter, you can go ahead.

http://www.easymodrewrite.com/example-subdomains

Tomasz Kowalczyk
A: 

Try to add them as ServerAlias in your httpd config file.

Darmen