> problem is that
>
> Document Root for each virtual host is on
> /var/www/www.virtualhost1.com
> and I'm trying to forward http://www.virtualhost1.com/stats to
> /var/reports/www.virtualhost1.com
> so rewrite rule
> RewriteRule ^/stats(.*) /var/reports/%{SERVER_NAME}$1 [PT]
> really looks for
> /var/www/www.virtualhost1.com/var/reports/www.virtualhost1.com
> not to
> /var/reports/www.virtualhost1.com
> how to handle this:( ????
> bests&thanks,
> jaume.
I believe that Apache dont permit you read files outside from
DocumentRoot.
Humm... make a link from DocumentRoot to /var/reports, clean
and rewrite & alias lines and try ...
good luck!
Example of my rules for rewriting:
www.<someone>.pucela.org/<any>
to
www.pucela.org/<someone>/<any>
to
/var/www/pucela.org/<someone>/<any>
:
<VirtualHost 194.224.8.149>
ServerName www.pucela.org
ServerAlias pucela.org *.pucela.org
# ServerPath /pucela.org
DocumentRoot /var/www/pucela.org
ServerAdmin [EMAIL PROTECTED]
CustomLog /var/log/apache/pucela.org-access_log common
ErrorLog /var/log/apache/pucela.org-error_log
ErrorDocument 404 /fallo.html
RewriteEngine On
# RewriteLog /var/log/apache/pucela.org-rewrite_log
# RewriteLogLevel 9
RewriteCond %{SERVER_NAME} www\.(.*)\.pucela\.org [NC]
RewriteRule ^/(.*)$ /%1/$1 [L]
RewriteCond %{SERVER_NAME} !^www [NC]
RewriteCond %{SERVER_NAME} (.*)\.pucela\.org [NC]
RewriteRule ^/(.*)$ /%1/$1 [L]
</VirtualHost>
-----------------------------------8<-----------------------------------
Look: 2 rules, for 2 cases:
www.<someone>.pucela.org
&
<someone>.pucela.org
-----------------------------------8<-----------------------------------
/ Asesora y Proveedora [EMAIL PROTECTED]
\ de Servicios de Internet, S.L. [EMAIL PROTECTED]
-----------------------------------8<-----------------------------------
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]