On 5/15/07, Matteo Forni <matteo.forni@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx