Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony2 Subdomain Routing - Different Bundles
    text
    copied!<p><strong>EDIT</strong> There is now the possibility of doing this in symfony 2.2</p> <pre><code>PlatformFooBundle: resource: "@PlatformFooBundle/Resources/config/routing.php" domain: foo.testdomain.com PlatformBarBundle: resource: "@PlatformBarBundle/Resources/config/routing.php" domain: bar.testdomain.com PlatformBazBundle: resource: "@PlatformBazBundle/Resources/config/routing.php" domain: baz.testdomain.com </code></pre> <p>You can use parameters in the domain as well</p> <p><strong>EDIT OVER</strong></p> <p>Before marking this as a duplicate, read on</p> <p><a href="http://www.craftitonline.com/2011/08/symfony2-locale-on-subdomains-not-on-the-url-path/" rel="nofollow">http://www.craftitonline.com/2011/08/symfony2-locale-on-subdomains-not-on-the-url-path/</a></p> <p>I've read this article, but it doesnt help me do what im trying to do.</p> <p>i have 3 different applications that are running on the same domain name, with seperate subdomains. Currently, theya re all running in their own symfony install, and i'd like to get rid of that.</p> <pre><code>foo.testdomain.com bar.testdomain.com baz.testdomain.com </code></pre> <p>each of these use different bundles</p> <pre><code>PlatformFooBundle PlatformBarBundle PlatformBazBundle </code></pre> <p>and they each have their own route definitions.</p> <p>basically, what i want is this</p> <pre><code>PlatformFooBundle: resource: "@PlatformFooBundle/Resources/config/routing.php" subdomain: www|devwww PlatformBarBundle: resource: "@PlatformBarBundle/Resources/config/routing.php" subdomain: bar|devbar PlatformBazBundle: resource: "@PlatformBazBundle/Resources/config/routing.php" subdomain: baz|devbaz </code></pre> <p>how do i go about doing this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload