Afficher un message
Vieux 21/07/2005, 11h06   #3
Mads Toftum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mod_rewrite capturing hostname?

On Wed, 13 Jul 2005 17:16:52 +0200, Ivan Voras <ivoras@fer.hr> wrote:
> Is there a way to catch the hostname (or rather the intended hostname
> from the Host: HTTP/1.1 header) in the rewrite rule?
>
> I'd like to do something like virtual hosts without actual virtual
> hosts, to rewrite urls like this:
>
> www.myserver1.com/something -> myinternalmachine/dir1/something
> www.myserver2.com/something -> myinternalmachine/dir2/something
>

Sure - Read The Fine Manual:
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
Look at Virtual User Hosts - that should point you in the right direction.

vh

Mads Toftum
--
Speaking at ApacheCon 2005/EU - http://apachecon.com
  Réponse avec citation
 
Page generated in 0,05051 seconds with 9 queries