title: mod_rewrite rule for anchors
body: <p>I want to rewrite a <strong>url</strong> to a <strong>url with anchors</strong></p>
  
  <pre><code>from "topic/14/599" to "topic.php?id=14#599"
  </code></pre>
  
  <p>this is my current rewriterule:</p>
  
  <pre><code>RewriteRule ^topic/([0-9]+)/([0-9]+)$ /topic.php?id=$1#$2 [NE,L,R]
  </code></pre>
  
  <p>this works fine, but the rewritten rule is in the adressbar !
  so the browser's addressbar changes from "topic/14/599" to "topic.php?id=14#599"</p>
  
  <p>I would prefer to keep the "simplified" version in the addressbar, the rewriterule however doesn't work without the L,R-flags, I just can't get it to work. 
  (if I just rewrite topic/14 to topic.php?id=14 without any flags it works just fine)</p>
  
  <p>Update:</p>
  
  <pre><code>RewriteRule ^topic/([0-9]+)/([0-9]+)$ topic.php?id=$1&amp;a=$2 [NE]
  </code></pre>
  
  <p>now works! the addressbar looks to the user like: mydomain.com/topic/14/599
  and internally it is redirected to topic.php?id=14&amp;a=599 and once the page is loaded, javascript jumps to the element with id=599!</p>