redirect /subdirectory to /symlink/subdirectory where /symlink points to /
<p>i'm working on a drupal7 multisite setup based on subdirectories where example.com is used for the main website and example.com/subsite is another standalone drupal install. subsite is a symlink located in the root directory and also pointing to the root directory to give the subsite access to drupal core files. </p>

<p>now i have to make static content available via example.com/subsite/static, so i created a directory static in the root directory. that all works fine. </p>

<p>the problem is, that example.com/static is now also accessable and i want to prevent that.</p>

<p>i tried to redirect all requests to /static to /subsite/static resulting in inconsistent behaviour and redirect loops.</p>

<p>directory structure:</p>

<pre><code>/
/{various drupal directories}
/subsite -&gt; /
/static
</code></pre>

<p>rewrite rule:</p>

<pre><code>RewriteRule ^/static/(.*)$ /subsite/static/$1 [R,L]
</code></pre>

<p>thx in advance</p>