Are absolute file paths allowed in mod_rewrite?

This is a continuation of this issue.

I am trying to build a rule mod_rewritewhere the rewrite target is an absolute path outside the website root, for example

RewriteRule ^manual(/(.*))?$ /www/htdocs/customername/manual/$2 [L]

I need to do this because I cannot use Aliasin context .htaccess(shared hosting).

There are answers hinting that this is not possible at all.

It's true? I can not find any information in the manual.

Can someone clarify when absolute paths are possible and when not?

+3
source share
2 answers

Of course, you can use absolute file paths in your server configuration.

.htaccess, , , , <Location ...> .

+5

RewriteRule URL-. URL, . (.. URL-), .

, FollowSymLinks SymLinksIfOwnerMatch option. , script .

0

Source: https://habr.com/ru/post/1731184/


All Articles