title: Redirect requests only if the file is not found?
body: <p>I'm hoping there is a way to do this with mod_rewrite and Apache, but maybe there is another way to consider too.</p>
  
  <p>On my site, I have directories set up for re-skinned versions of the site for clients. If the web root is <code>/home/blah/www</code>, a client directory would be <code>/home/blah/www/clients/abc</code>. When you access the client directory via a web browser, I want it to use any requested files in the client directory if they exist. Otherwise, I want it to use the file in the web root.</p>
  
  <p>For example, let's say the client does not need their own <code>index.html</code>.  Therefore, some code would determine that there is no <code>index.html</code> in <code>/home/blah/www/clients/abc</code> and will instead use the one in <code>/home/blah/www</code>. Keep in mind that I don't want to redirect the client to the web root at any time, I just want to use the web root's file with that name if the client directory has not specified its own copy. The web browser should still point to <code>/clients/abc</code> whether the file exists there or in the root. Likewise, if there is a request for <code>news.html</code> in the client directory and it <em>does</em> exist there, then just serve that file instead of the web root's <code>news.html</code>. The user's experience should be seamless.</p>
  
  <p>I need this to work for requests on any filename. If I need to, for example, add a new line to <code>.htaccess</code> for every file I might want to redirect, it rather defeats the purpose as there is too much maintenance needed, and a good chance for errors given the large number of files.</p>
  
  <p>In your examples, please indicate whether your code goes in the .htaccess file in the client directory, or the web root. Web root is preferred.</p>