You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jerome Schevingt <li...@nightrain.com> on 2004/01/27 06:40:01 UTC
[users@httpd] [HELP] Apache with mod_rewrite
Hi
i search a solution at my problems (i am running to pache Advanced Server
2.0.48) .
Actually, i have into my virtualhost :
<VirtualHost stats.mydomain.com>
ServerAdmin noc@mydomain.com
ServerName stats.mydomain.com
DocumentRoot /var/www/stats-mydomain/html
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%v %h %l %u %t \"%r\" %>s %b %T" script
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\" VLOG=%{VLOG}e" vhost
ErrorLog /var/www/stats-mydomain/logs/error_log
TransferLog /var/www/stats-mydomain/logs/access_log
RewriteEngine On
RewriteRule ^/clients/(.+)$
http://www-srv1.mydomain.com/cgi-bin/awstats.pl?config=$1 [L,R]
</VirtualHost>
That's work very good ... when i put:
http://stats.mydomain.com/clients/www.dupond.com
he sent me to
http://www-srv1.mydomain.com/cgi-bin/awstats.pl?config=www.dupond.com
Now i want the same solution, but with use Proxy, for the url don't change.
My Problems :
I have put:
RewriteRule ^/clients/(.+)$
http://www-srv1.mydomain.com/cgi-bin/awstats.pl?config=$1 [P]
and when i put in url :
http://stats.mydomain.com/clients/www.dupond.com
i see with the rewrite start but he don't use "$1" !
the result are same that :
http://www-srv1.mydomain.com/cgi-bin/awstats.pl?config=awstats
Do you have a idea of why he don't put the $1 ?
he have a debug mode on rewrite ?
thanks for your help