title: Why is Apache's RewriteRule revealing local paths?
body: <p>I'm trying to use RewriteRules in <code>.htaccess</code> with relative paths, but Apache seems to want to output the <strong>physical</strong> path instead of the <strong>server</strong> path whenever I try to output a relative path. Absolute and server-root paths work fine. For example:</p>
  
  <pre><code>RewriteEngine On
  
  # this works fine, 127.0.0.1/ab redirects to 127.0.0.1/cd
  RewriteRule ^ab$ /cd [R]
  
  # this doesn't work... 127.0.0.1/wx redirects to 127.0.0.1/C:/path/to/files/yz
  RewriteRule ^wx$ yz [R]
  </code></pre>
  
  <p>Adding a "<code>RewriteBase /</code>" solves the problem, but it's tedious to add the path to every <code>.htaccess</code>, and it makes it harder to change the directory structure. Is there a reason RewriteBase defaults to the current <strong>physical</strong> path instead of the current <strong>URI</strong> path?</p>