I want to map multiple directories in a url:
www.example.com/manual
www.example.com/login
for directories outside the web root.
My web root
/www/htdocs/customername/site
the manual I want to redirect to is in
/www/customer/some_other_dir/manual
In mod_alias this will be equal
Alias /manual /www/customer/some_other_dir/manual
but since I only have access to .htaccess, I cannot use Alias, so I need to use mod_rewrite.
What I got now after this question is the following:
RewriteRule ^manual(/(.*))?$ /www/htdocs/customername/manual/$2 [L]
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):
The requested URL /www/htdocs/customername/manual/resourcename.htm
was not found on this server.
However, I checked with PHP: echo file_exists(...)and this file definitely exists.
? mod_rewrite, .htaccess. , mod_rewrite .htaccess , , ?
: -, FTP, , FTP.
- , , , .
, .
, 301, .