title: Can .htaccess rewrites request files outside of the htdocs/httpsdocs area of a server?
body: <p>On my server, a website resides within a directory similar to <code>/domains/domain.com/public_html</code>. I wish to keep the domain at this path, as all the main files are there, but is there any way to source <em>some</em> files from another location in my server, eg. <code>/global/script.js</code>?</p>
  
  <p>In short, I hope to write a <em>mod-rewrite</em> than can source specific files from outside the <strong>DocumentRoot</strong>, or something very similar, but I cannot work out a solution.</p>
  
  <p>I figure I could manage this by directing <strong>all</strong> files to a PHP script (css, js, php, images, etc), which will then work out what file is requested, load the files contents and return it with the correct header. I feel this will more than likely slow down all requests because I believe this requires more processes, is this correct?</p>