folgendes hab ich nun in meine httpd.conf eingefuegt und ich moechte, dass beim aufruf von http://localhost/ssl/index.html auf https://localhost/ssl/index.html weitergeleitet wird ;
und bei http://localhost/nonssl/index.html dort auch geblieben wird! es funktioniert so aber nicht!
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://localhost/ssl$1 [L,R]
<VirtualHost 127.0.0.1:443>
ServerName localhost
DocumentRoot "C:/Apache group/Apache2/htdocs/ssl"
SSLEngine on
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot "C:/Apache group/Apache2/htdocs/nonssl"
#SSLEngine on
#SSLCertificateFile conf/ssl/server.crt
#SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>
hi,
kann mir bitte jemand helfen? wie funktioniert das?
See also the <VirtualHost> and Listen directives.It means: du musst virtuelle Hosts anlegen und darin kannst du festlegen auf welchen port (http 80, https 443) der Server hört.
Viele Grüße, Rolf