On 5/15/07, Matteo Forni <[EMAIL PROTECTED]> wrote:
Dear Apache Users,
I have a problem: i want to redirect an user that visits
http://www.adomain.com/statistics to
http://IPADDR/awstats/awstats.pl?config=adomain but I don't know how
to.

I tryed with
RewriteRule www\.(.*)/statistics
http://IPADDR/awstats/awstats.pl?config=$1 but i get a 404 error.

If you used the RewriteLog to debug, you would see that RerwiteRule
matches only against the url-path of the request (the part after the
hostname and port).

You need to use something like
RerwiteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^/statistics http://IPADDR/awstats/awstats.pl?config=%1

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to