httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea" <softw...@polin.it>
Subject Re: [users@httpd] Mod-rewrite
Date Mon, 10 Feb 2003 08:40:04 GMT
Hi,
put inside each VirtualHost block these rules:

RewriteEngine On
RewriteCond %{SERVER_NAME} ([^\.]+)\.([^\.]+)$ [NC]
RewriteRule ^/$ /cgi-bin/stats.cgi?config=%1 [L]

Andrea,



----- Original Message -----
From: "Rodrigo Lagos" <lagosr@hotmail.com>
To: <users@httpd.apache.org>
Sent: Monday, February 10, 2003 09:14
Subject: [users@httpd] Mod-rewrite


> Hi all,
> I have been trying to do this for the past bunch of days, and just have
not
> been able to do it.
> I would like to use mod-rewrite to do the following.
>
> to take the request:
> http://stats.foo.org/
> and re write it to:
> http://stats.foo.org/cgi-bin/stats.cgi?config=foo
>
> I want to write is, so that i can use it in a generic fashio, so that i
can
> use to with all the Vhosts on my machine.
> what i mean is, i want to use one bit of code to deal with foo.org, and
> blah.com, and bar.net, which would make [config=blah, config=bar] and so
> forth.
>
> any help woudl be great
> thanks
> --rodrigo
>
>
>
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message