title: mod_rewrite to absolute path in .htaccess - turning up 404
body: <p>I want to map a number of directories in a URL:</p>
  
  <pre><code>www.example.com/manual
  www.example.com/login
  </code></pre>
  
  <p>to directories outside the web root.</p>
  
  <p>My web root is </p>
  
  <pre><code>/www/htdocs/customername/site
  </code></pre>
  
  <p>the manual I want to redirect to is in</p>
  
  <pre><code>/www/customer/some_other_dir/manual
  </code></pre>
  
  <p>In mod_alias, this would be equal to</p>
  
  <pre><code>Alias /manual /www/customer/some_other_dir/manual
  </code></pre>
  
  <p>but as I have access only to <code>.htaccess</code>, I can't use Alias, so I have to use <code>mod_rewrite</code>.</p>
  
  <p>What I have got right now after <a href="https://stackoverflow.com/questions/2188274/whats-wrong-with-this-mod-rewrite-statement/2188317#2188317">this question</a> is the following:</p>
  
  <pre><code>RewriteRule ^manual(/(.*))?$ /www/htdocs/customername/manual/$2 [L]
  </code></pre>
  
  <p>this works in the sense that requests are recognized and redirected properly, but I get a 404 that looks like this (note the absolute path):</p>
  
  <pre><code>The requested URL /www/htdocs/customername/manual/resourcename.htm 
  was not found on this server.
  </code></pre>
  
  <p>However, I have checked with PHP: <code>echo file_exists(...)</code> and that file definitely exists.</p>
  
  <p>why would this be? According to the mod_rewrite docs, this is possible, even in a .htaccess file. I understand that when doing mod_rewrite in .htaccess, there will be an automated prefix, but not to absolute paths, will it?</p>
  
  <p>It shouldn't be a rights problem either: It's not in the web root, but within the FTP tree to which only one user, the main FTP account, has access.</p>
  
  <p>I can change the web root in the control panel anytime, but I want this to work the way I described.</p>
  
  <p>This is shared hosting, so I have no access to the error logs.</p>
  
  <p>I just checked, this is not a wrongful 301 redirection, just an internal rewrite.</p>