Chris on 20 Jun 2005 15:38:05 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: [PLUG] Another apache RewriteCond question


Thanks for the reply. I actually got it to work with:

RewriteCond %{HTTP_HOST} !^domain.dom(:443)?$
RewriteRule ^/(.*) https://domain.dom/$1 [L,R]

But now the browser is sending a warning that the domain does not match the
SSL certificate. I need to drop the www before the hostname gets sent to the
browser. This simple problem is starting to get confusing. I need to find
something to write a condition with that 1. Does not involve the hostname
and  2. Will not create a loop. 

...or we could just buy another certificate for the www :-\



I am going to seek out an apache list; I don't want to bombard everyone with
apache specific questions.

Chris


-----Original Message-----
From: plug-bounces@lists.phillylinux.org
[mailto:plug-bounces@lists.phillylinux.org] On Behalf Of Chris
Sent: Monday, June 20, 2005 11:30 AM
To: 'Philadelphia Linux User's Group Discussion List'
Subject: RE: [PLUG] Another apache RewriteCond question

RewriteCond %{HTTP_HOST}   !^www\.domain\.dom [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://domain.com/$1 [L,R]

-----Original Message-----
From: plug-bounces@lists.phillylinux.org
[mailto:plug-bounces@lists.phillylinux.org] On Behalf Of Chris
Sent: Monday, June 20, 2005 10:59 AM
To: 'Philadelphia Linux User's Group Discussion List'
Subject: [PLUG] Another apache RewriteCond question

Hey everyone,

I seem to be chasing my tail on something that I thought would be rather
easy. All I am trying to accomplish is to drop the www (if user submitted)
to an SSL site. In my virtual host for the 443 port I had tried to just:

RewriteCond Host: www\.domain\.dom
RewriteRule ^/(.*) https://domain.dom/$1 [L,R]


For the life of me I can not track down the proper syntax of this rule. I
know it must be something easy that I am overlooking so I ask if you guys
could take a quick look at it for me.

Thanks in advance,

Chris



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug