Hello everybody,
I’ve checking all kinds of sources of information so far without success, I
hope I didn’t miss anything.
I have a very simple RewriteRule which should take the requested resource
part. What I want to achieve is to prepend an string before that matched path.
Something like:
RewriteRule ^(.*)$ http://myserver/special_path/$1 [R=301]
I’d say that should take the requested resource path and redirect the client
to a new location. It does work in some places, but I’d like to use under a
conditional <If>. When I do
that, the match is instead expanded to the local filesystem path, if I request
the “/“ (root) of the server, the client is being redirected to:
http://myserver/special_path/var/www/html
<http://myserver/special_path/var/www/html>
Never mind about the DocumentRoot path. Anyway, that’s not the desired
behaviour.
Perhaps we’re doing something wrong, but what puzzles me is the fact that if
move the redirect logic outside the <If> block, then it apparently works fine.
Best,
Gustau
—
Marfeel Solutions S.L.
Avda. Josep Tarradellas 20-30, 6th Floor,
08029 Barcelona, Spain
ES: (+34) 93 178 59 50 ext128
US: (+1) 917-341-2540 ext128
UK: (+44) 207-048-37-28 ext128
https://www.marfeel.com/
Atenea Knowledge Base