httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karoly VEGH <>
Subject Re: http --> https
Date Wed, 26 Jun 2002 13:45:24 GMT
On Wed, 26 Jun 2002, Bruno Wolff III wrote:

> > I would like to get apache force the browser to use https instead of
> > http... erm, is this possible?
> The protocols are different. Trying to use https on port 80 won't work
> (well not the way you want). What you can do is set up a webserver
> on port 80 that redirects http resquests to https requests.

i tried to ways to solve it:

1: Rewrite:


DocumentRoot "/opt/apache/htdocs"
ServerName my.servername

ErrorLog /opt/apache/logs/error_log
TransferLog /opt/apache/logs/access_log

RewriteEngine   on
RewriteCond     %{HTTPS} !=on
RewriteRule     ^/(.*)$  https://%{SERVER_NAME}/$1  [R,L]


...this should work, but somwhow did not for me...

but the other way worked:

2: Redirect:

instead of rewrite i also tried:

Redirect / https://my.servername

so it works, cool and easy.

thx, charlie

Vegh Karoly

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message