Re: [users@httpd] redirect based on HTTP_HOST using mod_rewrite

2012-01-26 Thread Thomas Carrié
You are right I have updated my conf for NameVirtualHost instead of mod_rewrite, it does the job Thanks On Wednesday, January 25, 2012 11:41:49 PM Pete Houston wrote: > On Wed, Jan 25, 2012 at 10:58:02PM +0100, Thomas Carrié wrote: > > It is the first time I use module mod_rewrite is totally ne

Re: [users@httpd] redirect based on HTTP_HOST using mod_rewrite

2012-01-25 Thread Pete Houston
On Wed, Jan 25, 2012 at 10:58:02PM +0100, Thomas Carrié wrote: > It is the first time I use module mod_rewrite is totally new to me, 2 things > are unclear to me: Why are you using mod_rewrite at all? Just use a NameVirtualHost and set up 2 virtual hosts for your 2 domains to which you could then

Re: [users@httpd] redirect based on HTTP_HOST using mod_rewrite

2012-01-25 Thread Thomas Carrié
On Wednesday, January 25, 2012 11:03:50 PM Serge Fonville wrote: > Hi, > > RewriteCond does an AND unless you tell it to do an OR. OK for the AND condition > > You mention the querystring, but /unauthorized isn't it, is it? > if you want to filter based on the urlpath you should do it different

Re: [users@httpd] redirect based on HTTP_HOST using mod_rewrite

2012-01-25 Thread Serge Fonville
Hi, RewriteCond does an AND unless you tell it to do an OR. You mention the querystring, but /unauthorized isn't it, is it? if you want to filter based on the urlpath you should do it differently. Please add the information so we better understand what you are trying to accomplish. HTH Kind r

[users@httpd] redirect based on HTTP_HOST using mod_rewrite

2012-01-25 Thread Thomas Carrié
Hi, I have 2 DNS entries - a.domain.com - b.domain.com They target the same IP: 1.2.3.4 I want to setup apache - to accept requests on a.domain.com - to forbid requests on b.mydomain.com I have tried this config Listen 1.2.3.4:80 ServerName a.domain.com # page to be served for users t