PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > mod_rewrite capturing hostname?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

mod_rewrite capturing hostname?

Réponse
 
LinkBack Outils de la discussion
Vieux 13/07/2005, 16h16   #1
Ivan Voras
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mod_rewrite capturing hostname?

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


  Réponse avec citation
Vieux 21/07/2005, 10h06   #2
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
Vieux 21/07/2005, 10h06   #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
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h17.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10906 seconds with 11 queries