Adding Subdomain Requirements to Symfony Routing
Kris Wallsmith just posted a great tutorial showcasing Symfony 1.2′s flexibility by demonstrating how to add subdomain requirements to routing.yml:
A question came across the mailing list today that provides an excellent opportunity to demonstrate the flexibility of the symfony 1.2 routing system.
Evert Harmeling posed the following:
How can I point sub1.domain.com/test to a different route than sub2.domain.com/test inside the same application?
This is not supported natively by the symfony core, but the routing system can easily be extended to meet Evert’s requirement.
This is a neat extension of Symfony’s core. I’ve written before about using subdomains to load Symfony applications in the same project but this is a bit different as it’s switching subdomains within the same Symfony application.
Find This Article Useful?
Related Articles
About this entry
You’re currently reading “Adding Subdomain Requirements to Symfony Routing,” an entry on MirthLab
- Published:
- Monday, March 2nd, 2009 at 12:39 pm
- Author:
- Mark Quezada
- Category:
- Links, Web Development
- Tags:
- application, controller, routing, subdomain, symfony, symfony 1.2

No comments
Jump to comment form | comments rss | trackback uri