I have two subdomains pointing to the “web” directory in my Symfony 1.4 implementation and would like to route to certain modules/actions based which subdomain was used to arrive at the site
sub1.domain.com --> module1/action
sub2.domain.com --> module2/action
Is there an easy way to do this in routing.yml? Customize index.php, parsing the host for subdomain?
Take a look at this chapter in More With Symfony. It does essentially the same thing by creating a custom route that checks the subdomain… It uses the DB but you could omit that if you dont need to hit the DB.