On Dec 9, 2007 11:33 AM, Susan Stewart &lt;<a href="mailto:HedgeMage@binaryredneck.net">HedgeMage@binaryredneck.net</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Khalid Baheyeldin wrote:<br>&gt;<br>&gt;<br>&gt; On 09 Dec 2007, at 6:30 AM, Larry Garfield wrote:<br>&gt;<br>&gt;&gt; Emphasis on the &quot;properly&quot;. :-) &nbsp;I had been going with the<br>&gt;&gt; conventional wisdom of sites/&lt;site&gt;/files, but when I went to merge
<br>&gt;&gt; &nbsp;two sites into a multi-site to deploy them realized that wouldn&#39;t<br>&gt;&gt; work; the path that is stored into the files table is then bound to<br>&gt;&gt; &nbsp;the domain the site is on, which is no good because the domain
<br>&gt;&gt; changes from staging to production. &nbsp;So if we document<br>&gt;&gt; sites/default/files for single-site installs, we need to in the<br>&gt;&gt; same breath document to *not* use the sites/ directory for<br>&gt;&gt; multi-site installs unless you want to make moving to a new server
<br>&gt;&gt; to be a PITA.<br>&gt;<br>&gt; Perhaps a decoupling of the paths from the domain is in order.<br>&gt;<br>&gt; There is a way to do it today with symlinks: under &quot;sites/&quot; we have<br>&gt; s1, s2, s3, ...etc. One directory per site. Then files would be
<br>&gt; &quot;sites/s1/files&quot;. A symbolic link then makes s1 be <a href="http://site1.example.com" target="_blank">site1.example.com</a><br></div>&gt; &lt;<a href="http://site1.example.com" target="_blank">http://site1.example.com
</a>&gt;, and s2 <a href="http://www.example.com" target="_blank">www.example.com</a><br>&gt; &lt;<a href="http://www.example.com" target="_blank">http://www.example.com</a>&gt; and s3 is <a href="http://example3.com" target="_blank">
example3.com</a><br>&gt; &lt;<a href="http://example3.com" target="_blank">http://example3.com</a>&gt;, ...etc.<br><br>My sites/ folder on my multisite installs is cluttered enough, thanks.<br>Also, if I want to make changes to a site, I would have to first figure
<br>out what directory the symlink points to -- an unnecessary step that<br>would definitely slow down my workflow.<br></blockquote><div><br>Symlinks is just what works today, and acceptable for installations with<br>not too many sites. Granted, you get the bramble bush that comes with it
<br>and that can be unwieldy.<br><br>Perhaps the indirection should be formalized in a different way, with a <br>map of some sort (domain -&gt; directory), either in a master file under <br>sites, or in the database (slow).
<br><br>map.conf<br>&lt;?php<br><br>$map = array(<br>&nbsp; // Site domain/subdomain =&gt; site ID and<br>&nbsp; &#39;<a href="http://example.com">example.com</a>&#39; =&gt; &#39;site1&#39;,<br>&nbsp; &#39;<a href="http://example2.com">
example2.com</a>&#39; =&gt; &#39;site3&#39;,<br>
&nbsp; &#39;<a href="http://example7.com">example7.com</a>&#39; =&gt; &#39;mydir5&#39;,<br>
&nbsp; &#39;<a href="http://site3.example.com">site3.example.com</a>&#39; =&gt; &#39;otherdir2&#39;,<br>
);<br><br>Once a site gets an ID/Dir, this does not change at all for the lifetime <br>of the site. Domains/Subdomains can be changed at will, such as when<br>moving a site from test to live, or from multisite to standalone, ...etc.
<br></div></div>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a><br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.