Page 1 of 1
mod_rewrite to redir http to https
Posted: 2005-02-09 20:21
by eth
Also ich fasse mich kurz, ich will einen apache2-vhost mit http auf einen vhost mit https umleiten... weiss wer wie das geht?
Ich danke im Voraus :)
Debian Woody
Apache2 2.0.52
Re: mod_rewrite to redir http to https
Posted: 2005-02-09 20:28
by superuser1
Hi...
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
In den entsprechenden VHost folgendes eintragen:
Code: Select all
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.domain.de/$1 [R]
:roll:
Dankööö
Posted: 2005-02-09 20:54
by eth
Oki, ich danke, ich hätt da jetzt wieder stundenlang dran rumgewerkelt, also nochmal vielen dank :)
Re: mod_rewrite to redir http to https
Posted: 2005-02-09 21:36
by Joe User
Code: Select all
<VirtualHost *:80>
ServerName www.domain.tld
Redirect permanent / https://www.domain.tld/
</VirtualHost>