title: .htaccess check if file exists in multiple sub-folders and rewrite
body: <p>Let's suppose that I have a static website on Apache server with this folders structure:</p>
  
  <pre><code>http://www.example.com
  |    
  +-- /news/
  |  |  
  |  +-- page1.html
  |  +-- page2.html
  |  +-- ...
  |
  +-- /otherstuff/
  </code></pre>
  
  <p>The url of the pages inside the /news/ folder is:</p>
  
  <pre><code>http://www.example.com/news/page1.html  
  http://www.example.com/news/page2.html
  </code></pre>
  
  <p>Now, the number of files in the /news/ folder is growing and I would like to create new subfolders inside /news/ and split files across these new dirs, but I also want to hide the subfolders names in the urls.       </p>
  
  <p>The new folders structure will be:</p>
  
  <pre><code>http://www.example.com
  |    
  +-- /news/
  |  |  
  |  +-- /subfolder1/
  |  |   |
  |  |   +-- page1.html
  |  |
  |  +-- /subfolder2/
  |  |   |
  |  |   +-- page2.html
  |  +-- ...
  |
  +-- /otherstuff/
  </code></pre>
  
  <p>but <strong>the urls of the pages have to remain the same</strong>:</p>
  
  <pre><code>http://www.example.com/news/page1.html  
  http://www.example.com/news/page2.html
  </code></pre>
  
  <p>and <strong>not</strong>:</p>
  
  <pre><code>http://www.example.com/news/subfolder1/page1.html  
  http://www.example.com/news/subfolder2/page2.html
  </code></pre>
  
  <p>Is there a way to achive this result using rewrite rules in .htaccess?</p>
  
  <p>I've read this question:
  <a href="https://stackoverflow.com/questions/2176628/how-to-use-mod-rewrite-to-check-multiple-folders-for-a-static-file">How to use mod_Rewrite to check multiple folders for a static file</a></p>
  
  <p>but the accepted answer does not work for me.</p>
  
  <p>Thanks in advance for any advice.</p>