httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zliu1 <zl...@nd.edu>
Subject RE: [users@httpd] rewriting http to https
Date Wed, 02 Oct 2002 22:00:53 GMT


On Wed, 2 Oct 2002, Nelson, Robert D. wrote:

> Dave:
> 
> > Can you just do it like this, and not use rewrite?
> > 
> > <VirtualHost 1.2.3.4:80>
> > 	ServerName www.domain.com
> > 	Redirect / https://www.domain.com/
> > </VirtualHost>
> > 
> > <VirtualHost 1.2.3.4:443>
> > 	ServerName www.domain.com
> > 	ServerAdmin webmaster@domain.com
> > 	DocumentRoot /location/of/doc/root
> > 	SSLEngine on
> > 	SSLCertificateFile /location/of/cert/domain-com.crt
> > 	...
> > </VirtualHost>
> 
> I'd prefer not to.  You see, I want any URL that's requested with that
> domain to be changed over to https, not just the root of the domain.  The
> way I understand it, redirecting "/" will only work if the user requests
> exactly "http://www.domain.com/".  Am I wrong in that?
> 
> ~ Robert

Try:

    <VirtualHost 1.2.3.4:80>
        ServerName www.domain.com
        RedirectMatch ^/(.*) https://www.domain.com/$1
    </VirtualHost>

Zuwei


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message