title: Rewrite urls with .htaccess file in localhost
body: <p>So I have managed to rewrite urls using the .htaccess file but the redirection messes up the url. For example I try to rewrite this:</p>
  
  <pre><code>localhost/mysite/public_html/class/5/
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>localhost/mysite/public_html/index.php?v=class&amp;id=5
  </code></pre>
  
  <p>and I use the following lines in the .htaccess file:</p>
  
  <pre><code>RewriteRule ^public_html/([A-Za-z]+)/([0-9]+)/?$ ./public_html/index.php?v=$1&amp;id=$2 [L,R]
  </code></pre>
  
  <p>but the browser redirects me here (I am using <strong>wamp</strong> on Windows 7):</p>
  
  <pre><code>localhost/C:/wamp/www/mysite/public_html/index.php?v=class&amp;id=5
  </code></pre>
  
  <p>Which is wrong and gets me a 403 error. What should I do? </p>