<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Dynamically Loading Symfony Applications Via Subdomains</title>
	<atom:link href="http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/</link>
	<description></description>
	<lastBuildDate>Sat, 04 Sep 2010 17:44:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Tal Ater</title>
		<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/comment-page-1/#comment-17798</link>
		<dc:creator>Tal Ater</dc:creator>
		<pubDate>Sat, 04 Sep 2010 17:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/#comment-17798</guid>
		<description>&lt;p&gt;Check out &lt;a href=&quot;http://www.symfony-project.org/plugins/sfDomainRoutePlugin&quot; rel=&quot;nofollow&quot;&gt;sfDomainRoutePlugin&lt;/a&gt; which lets you do many different Symfony tricks based on your subdomain... Even passing parameters in the subdomain, and changing routing rules based on different domains (e.g. user1.domain.com/show or news.domain.com)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Check out <a href="http://www.symfony-project.org/plugins/sfDomainRoutePlugin" rel="nofollow">sfDomainRoutePlugin</a> which lets you do many different Symfony tricks based on your subdomain&#8230; Even passing parameters in the subdomain, and changing routing rules based on different domains (e.g. user1.domain.com/show or news.domain.com)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jerzy Biernacki</title>
		<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/comment-page-1/#comment-11070</link>
		<dc:creator>Jerzy Biernacki</dc:creator>
		<pubDate>Thu, 26 Nov 2009 11:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/#comment-11070</guid>
		<description>&lt;p&gt;Hi, thanks for pointing me to the &quot;proper way&quot; of doing this in symfony.&lt;/p&gt;

&lt;p&gt;Did it like this in Symfony 1.2:
require_once(dirname(&lt;strong&gt;FILE&lt;/strong&gt;).&#039;/../config/ProjectConfiguration.class.php&#039;);&lt;/p&gt;

&lt;p&gt;list($tld, $domain, $subdomain, $subdomain2) = array_reverse(explode(&#039;.&#039;, $_SERVER[&#039;HTTP_HOST&#039;]));&lt;/p&gt;

&lt;p&gt;//Set subdomains that should point to backend
$backendIndicators = array(
    &#039;admin&#039;
//    ,&#039;administracja&#039;
);
$app = (in_array($subdomain,$backendIndicators) &#124;&#124; in_array($subdomain2,$backendIndicators)) ? &#039;backend&#039; : &#039;frontend&#039;;  //if subdomain or subdomain2 equals backendIndicator - point to backend, in every other condition - point to frontend&lt;/p&gt;

&lt;p&gt;$configuration = ProjectConfiguration::getApplicationConfiguration($app, &#039;prod&#039;, false);    //switch apps based on $app
sfContext::createInstance($configuration)-&gt;dispatch();&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, thanks for pointing me to the &#8220;proper way&#8221; of doing this in symfony.</p>

<p>Did it like this in Symfony 1.2:
require_once(dirname(<strong>FILE</strong>).&#8217;/../config/ProjectConfiguration.class.php&#8217;);</p>

<p>list($tld, $domain, $subdomain, $subdomain2) = array_reverse(explode(&#8216;.&#8217;, $_SERVER['HTTP_HOST']));</p>

<p>//Set subdomains that should point to backend
$backendIndicators = array(
    &#8216;admin&#8217;
//    ,&#8217;administracja&#8217;
);
$app = (in_array($subdomain,$backendIndicators) || in_array($subdomain2,$backendIndicators)) ? &#8216;backend&#8217; : &#8216;frontend&#8217;;  //if subdomain or subdomain2 equals backendIndicator &#8211; point to backend, in every other condition &#8211; point to frontend</p>

<p>$configuration = ProjectConfiguration::getApplicationConfiguration($app, &#8216;prod&#8217;, false);    //switch apps based on $app
sfContext::createInstance($configuration)-&gt;dispatch();</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Quezada</title>
		<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/comment-page-1/#comment-74</link>
		<dc:creator>Mark Quezada</dc:creator>
		<pubDate>Thu, 06 Mar 2008 21:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/#comment-74</guid>
		<description>&lt;p&gt;@Hugo: Thanks! Glad you found it useful.&lt;/p&gt;

&lt;p&gt;@hartym: Also a good article and basically the same approach I&#039;ve used here. I think my goal is a bit different though as I wanted applications to be dynamically loaded if they exist where you&#039;re only checking for specific sub-domains. Also, since I don&#039;t put my &#039;dev&#039; controllers on my production server (since the databases used on dev are named differently and wouldn&#039;t work with the production machine anyway) I&#039;m not specifically allowing access to that environment. Thanks for the link!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Hugo: Thanks! Glad you found it useful.</p>

<p>@hartym: Also a good article and basically the same approach I&#8217;ve used here. I think my goal is a bit different though as I wanted applications to be dynamically loaded if they exist where you&#8217;re only checking for specific sub-domains. Also, since I don&#8217;t put my &#8216;dev&#8217; controllers on my production server (since the databases used on dev are named differently and wouldn&#8217;t work with the production machine anyway) I&#8217;m not specifically allowing access to that environment. Thanks for the link!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: hartym</title>
		<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/comment-page-1/#comment-72</link>
		<dc:creator>hartym</dc:creator>
		<pubDate>Thu, 06 Mar 2008 18:10:40 +0000</pubDate>
		<guid isPermaLink="false">http://mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/#comment-72</guid>
		<description>&lt;p&gt;I wrote an article about this a while ago on http://www.symforc.com/post/2007/06/28/A-new-indexphp-controller-for-subdomains&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I wrote an article about this a while ago on <a href="http://www.symforc.com/post/2007/06/28/A-new-indexphp-controller-for-subdomains" rel="nofollow">http://www.symforc.com/post/2007/06/28/A-new-indexphp-controller-for-subdomains</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo</title>
		<link>http://blog.mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/comment-page-1/#comment-71</link>
		<dc:creator>Hugo</dc:creator>
		<pubDate>Thu, 06 Mar 2008 12:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://mirthlab.com/2008/03/04/dynamically-loading-symfony-applications-via-subdomains/#comment-71</guid>
		<description>&lt;p&gt;Nice presentation of a specific Symfony configuration ! I bookmark it ;)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice presentation of a specific Symfony configuration ! I bookmark it <img src='http://blog.mirthlab.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 210/327 objects using disk

Served from: blog.mirthlab.com @ 2010-09-06 03:21:52 -->