Re: Apache2 & mod_rewrite

2005-09-17 Thread Simo Kauppi
On Sat, Sep 17, 2005 at 06:47:12PM +0200, Marco wrote: > OK. Apache2 works perfectly now. Thanks :-) > > I have also an other question to the rewrite module and Apache2. I have > configurated a virtual host with ssl. > I would like all connection to "https://*.domain.com"; are rewritten to > "ht

Re: Apache2 & mod_rewrite

2005-09-17 Thread Marco
Simo Kauppi ha scritto: Okey, how does this look? 000-domain: NameVirtualHost xxx.xxx.xxx.xxx ServerAdmin [EMAIL PROTECTED] ServerName www.domain.com ServerAlias *.domain.com domain.com RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]

Re: Apache2 & mod_rewrite

2005-09-16 Thread Simo Kauppi
On Fri, Sep 16, 2005 at 04:30:38PM +0200, Marco wrote: > Hi Simo, > the problem is not still this... :-) > My server has following CNAME name on DNS server: www.domain.com, > pop.domain.com, smtp.domain.com ecc... > I would like that a user digit on his client http://www.domain.com he > see the

Re: Apache2 & mod_rewrite

2005-09-16 Thread Marco
Angelo Bertolli ha scritto: Angelo Bertolli wrote: Marco wrote: Angelo Bertolli ha scritto: ServerName domain.com ServerAlias www.domain.com ServerAlias pop.domain.com ... RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^pop\.domain\.com$ [NC] Rewri

Re: Apache2 & mod_rewrite

2005-09-16 Thread Angelo Bertolli
Angelo Bertolli wrote: Marco wrote: Angelo Bertolli ha scritto: ServerName domain.com ServerAlias www.domain.com ServerAlias pop.domain.com ... RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^pop\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.

Re: Apache2 & mod_rewrite

2005-09-16 Thread Angelo Bertolli
Marco wrote: Angelo Bertolli ha scritto: ServerName domain.com ServerAlias www.domain.com ServerAlias pop.domain.com ... RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^pop\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1

Re: Apache2 & mod_rewrite

2005-09-16 Thread Marco
Angelo Bertolli ha scritto: ServerName domain.com ServerAlias www.domain.com ServerAlias pop.domain.com ... RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^pop\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1

Re: Apache2 & mod_rewrite

2005-09-16 Thread Angelo Bertolli
Marco wrote: If I put only the option "ServerAlias", the bar of the client doesn't come rewritten. You need to do both a ServerAlias and a Rewrite. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: Apache2 & mod_rewrite

2005-09-16 Thread Marco
Simo Kauppi ha scritto: Hey Marco, I thought I knew what you was trying to do, but now I think I don't :( The rewrite rule that we started with does exactly that, i.e. it rewrites the clients request domain1.com to www.domain1.com. I thought this was what you were trying to do originally. Any

Re: Apache2 & mod_rewrite

2005-09-14 Thread Simo Kauppi
On Wed, Sep 14, 2005 at 09:20:09PM +0200, Marco wrote: > Simo Kauppi ha scritto: > > >On Mon, Sep 12, 2005 at 10:06:06PM +0200, Marco wrote: > > > > > >>I have test with your settings but I have still problems. This is the > >>configuration of 000-domain1.com > >> > >> > >>This is the configurat

Re: Apache2 & mod_rewrite

2005-09-14 Thread Angelo Bertolli
Marco wrote: Hi, I have removed the Rewrite rule on my Virtual Host configuration file, I have added the rule ServerAlias domain1.com *.domain1.com, and I have restart apache2. Test: http://www.domain1.com --> OK http://domain1.com --> PAGE NOT FOUND ??? I have also an other question, using

Re: Apache2 & mod_rewrite

2005-09-14 Thread Marco
Simo Kauppi ha scritto: On Mon, Sep 12, 2005 at 10:06:06PM +0200, Marco wrote: Simo Kauppi ha scritto: It seems to me that the conditions for the first domain say that any hostname which is not www.doamin1.com should go to www.domain1.com. I.e. Apache is doing exacly as asked (domain2

Re: Apache2 & mod_rewrite

2005-09-12 Thread Simo Kauppi
On Mon, Sep 12, 2005 at 10:06:06PM +0200, Marco wrote: > Simo Kauppi ha scritto: > > >It seems to me that the conditions for the first domain say that > >any hostname which is not www.doamin1.com should go to www.domain1.com. > >I.e. Apache is doing exacly as asked (domain2.com != www.domain1.com)

Re: Apache2 & mod_rewrite

2005-09-12 Thread Angelo Bertolli
Marco wrote: Angelo Bertolli ha scritto: I think you need to add ServerAlias domain2.com to your second vhost. When Apache first decides which vhost block to use, it doesn't find one for domain2.com so it defaults to the first block. I would want that when a user write a URL as http://d

Re: Apache2 & mod_rewrite

2005-09-12 Thread Marco
David Clymer ha scritto: Perhaps I don't understand exactly what you want to do..but wouldnt it be much easier to add a ServerAlias to the vitualhost config? ServerName domain1.com ServerAlias www.domain1.com ... -davidc Hi David, I would want rewrite the URL of client ex. http:

Re: Apache2 & mod_rewrite

2005-09-12 Thread Marco
Angelo Bertolli ha scritto: I think you need to add ServerAlias domain2.com to your second vhost. When Apache first decides which vhost block to use, it doesn't find one for domain2.com so it defaults to the first block. I would want that when a user write a URL as http://domain1.com the

Re: Apache2 & mod_rewrite

2005-09-12 Thread Angelo Bertolli
Marco wrote: Simo Kauppi ha scritto: It seems to me that the conditions for the first domain say that any hostname which is not www.doamin1.com should go to www.domain1.com. I.e. Apache is doing exacly as asked (domain2.com != www.domain1.com) :) I guess you want requests to http://domain2.co

Re: Apache2 & mod_rewrite

2005-09-12 Thread Marco
Simo Kauppi ha scritto: It seems to me that the conditions for the first domain say that any hostname which is not www.doamin1.com should go to www.domain1.com. I.e. Apache is doing exacly as asked (domain2.com != www.domain1.com) :) I guess you want requests to http://domain2.com to go to the

Re: Apache2 & mod_rewrite

2005-09-11 Thread David Clymer
On Sun, 2005-09-11 at 21:38 +0200, Marco wrote: > Hi, > I have a problem with apache2 and rewrite module. > > VirtualHost for site www.domain1.com > ... > RewriteCond %{HTTP_HOST} !^www\.domain1\.com [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteRule ^/(.*) http://www.domain1.com/$1 [L

Re: Apache2 & mod_rewrite

2005-09-11 Thread Simo Kauppi
On Sun, Sep 11, 2005 at 09:38:37PM +0200, Marco wrote: > Hi, > I have a problem with apache2 and rewrite module. > > VirtualHost for site www.domain1.com > ... > RewriteCond %{HTTP_HOST} !^www\.domain1\.com [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteRule ^/(.*) http://www.domain1.com

Apache2 & mod_rewrite

2005-09-11 Thread Marco
Hi,I have a problem with apache2 and rewrite module.   VirtualHost for site www.domain1.com...RewriteCond %{HTTP_HOST}   !^www\.domain1\.com [NC]RewriteCond %{HTTP_HOST}   !^$RewriteRule ^/(.*) http://www.domain1.com/$1 [L,R]   TEST OK. http://domain1.com --> http://www.domain1.com