hi

RewriteRule     ^/stats(.*)                    /reports/%{SERVER_NAME}$1

but it only forwards to   /_document_root_/reports/virtualhost.com
as I see on rewrite log then reports 404
so Alias /reports        /var/reports    has no effect

how to enable rewrite and then alias to change document_root path ?¿


thanks,
jaume.




Craig Sanders wrote:

> On Mon, Sep 04, 2000 at 06:20:09PM +0000, Jaume Teixi wrote:
> > I'm still getting 404  RewriteLog shows:
> >
> > ' pattern='^www\.[^.]+$' => not-matched
> >
> > whats happening ?
>
> i wasn't paying enough attention to your rules. they can't work as
> written. you want to look at the SERVER_NAME variable, not HTTP_HOST.
>
> also, turn on mod_rewrite logging, and increase the log level to help
> diagnose any faults. the rule below is untested, you'll probably have to
> tweak it a bit to get it working.
>
> remember to set loglevel back to 0 or 2 or whatever once you've got it
> working.  high logging levels will slow down your apache server.
>
> try something like:
>
>         RewriteLog "/var/log/apache/rewrite.log"
>         Rewrite Loglevel 9
>
>         RewriteEngine on
>         RewriteRule     ^/stats(/.*)                    
> /reports/%{SERVER_NAME}$1
>
> alternatively:
>
>         RewriteRule     ^/stats/(.*)                    
> /reports/%{SERVER_NAME}/$1
>
> (without testing, i'm not sure which form is better).
>
> you still need the Alias definition from my last message.
>
> then make sure that your stats processing software puts the results in a
> subdirectory under /var/reports which has exactly the same name as the
> ServerName keyword in the the <VirtualHost>...</VirtualHost> config.
>
> e.g. if you have a virtual host with ServerName www.foo.com then the
> reports for that host should go in /var/reports/www.foo.com/
>
> craig
>
> --
> craig sanders

--
Jaume Teixi
    Administrador de Sistemes
    6TEMS - Ducform, SA
    http://www.6tems.com



Reply via email to