PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Grouping mod_rewrite statements.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Grouping mod_rewrite statements.

Réponse
 
LinkBack Outils de la discussion
Vieux 24/01/2008, 11h05   #1
Googy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Grouping mod_rewrite statements.

Hi,


I have to sites say siteone.com, sitetwo.com. And I have updated
these two sites to point to one webhost. i.e these two sites share the
same webspace. I have created two sub folders and using mod_rewrite
to check domain name and transparently serve the pages from
corresonding folders. My problem is I have to put RewriteCond(only
checks for HTTP_HOST) before every RewriteRule. And keeping track of
all these statements are difficult. I want to know if its possible
to group all the corresonding RewriteRule togather and don't bother
about writing RewriteCond more than once.

Since the http GET & POST requests coming with two different host
names I think its possible to do. Please enlighten me on this issue.
One more thing I have to do all this magic inside .htaccess file.


Thanks.
  Réponse avec citation
Vieux 24/01/2008, 18h32   #2
Kees Nuyt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Grouping mod_rewrite statements.

On Thu, 24 Jan 2008 03:05:45 -0800 (PST), Googy
<cooldudevamsee@gmail.com> wrote:

>Hi,
>
>
>I have to sites say siteone.com, sitetwo.com. And I have updated
>these two sites to point to one webhost. i.e these two sites share the
>same webspace. I have created two sub folders and using mod_rewrite
>to check domain name and transparently serve the pages from
>corresonding folders. My problem is I have to put RewriteCond(only
>checks for HTTP_HOST) before every RewriteRule. And keeping track of
>all these statements are difficult. I want to know if its possible
>to group all the corresonding RewriteRule togather and don't bother
>about writing RewriteCond more than once.
>
>Since the http GET & POST requests coming with two different host
>names I think its possible to do. Please enlighten me on this issue.
>One more thing I have to do all this magic inside .htaccess file.
>
>Thanks.


Would Name Based Virtual Host solve your problem?
http://httpd.apache.org/docs/2.2/vhosts/

I don't think rewriting is very suitable in this case.
--
( Kees
)
c[_] Its a JOKE, like the funny kind but different. (#74)
  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 09h28.


É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,07220 seconds with 10 queries