httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karoly VEGH <karoly.v...@uta.at>
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:

<VirtualHost 10.3.2.231:80>

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

ServerAdmin root@netra1.utaiop.at
ErrorLog /opt/apache/logs/error_log
TransferLog /opt/apache/logs/access_log

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

</VirtualHost>

...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: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message