title: RewriteRule to match all characters
body: <p>So, I'm trying to write a htaccess file that will rewrite everything back to the root index file with a query added after it, so for example</p>
  
  <p><code>example.com/cheese/</code> will route to <code>example.com/index.php?cheese/</code></p>
  
  <p><code>example.com/cheese</code> will route to <code>example.com/index.php?cheese</code></p>
  
  <p><code>example.com/bob/fred</code> will orute to <code>example.com/index.php?bob/fred</code></p>
  
  <p>going in as many layers as necessary, does anyone have an suggestions?</p>
  
  <p>Currently trying this but it isn't working:</p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^(.*)/?$ index.php?$1
  </code></pre>
  
  <p>I know it isn't working because I am testing it with the following and the query output is not correct.</p>
  
  <pre><code>&lt;?php
      $page = $_SERVER['QUERY_STRING'];
      echo $page;
  ?&gt;
  </code></pre>