title: htaccess RewriteRule to shorten the URLs
body: <p>I would like to find a <code>RewriteRule</code> that does this :</p>
  
  <p><code>mysite.net/jqMAS/</code> or <code>mysite.net/jqMAS</code> =>  <code>mysite.net/index.php?id=jqMAS</code></p>
  
  <p>I used such a <code>.htaccess</code> file : </p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^(.*) index.php?id=$1
  </code></pre>
  
  <p>But unfortunately, it doesn't work (maybe <em>mysite.net/index.php</em> is itself redirected to <em>mysite.net/index.php?index.php</em>, etc. ?) : calling <code>mysite.net/jqMAS</code> produces a <code>500 Internal Server Error</code>.</p>
  
  <p><strong>What <code>RewriteRule</code> should we use to do such URL shortening ?</strong></p>
  
  <hr>
  
  <p>Here is what the <code>index.php</code> page (I didn't mention the headers) looks like : </p>
  
  <pre><code>  &lt;body&gt;
    Bonjour &lt;?php echo $_GET['id']; ?&gt;
    &lt;/body&gt;
  </code></pre>