eine default webseite beim Apache 2 automatisch umleiten

Post Reply
Message
Author
cc
Posts: 191
Joined: 18. Apr 2003 18:04

eine default webseite beim Apache 2 automatisch umleiten

#1 Post by cc »

hallo

wie kann ich eine eine default webseite beim Apache 2

von:

http://host

zu:

https://host

automatisch umleiten ?

gruss
cc

joersch

#2 Post by joersch »

Mahlzeit,

funzt bei mir so:

RewriteEngine on
RewriteLog logs/rew-host.log
RewriteRule ^/(.*)$ https://host.de/$1 [R,L]


"host" ist deine domain, die umgeleitet werden soll

Gruss

cc
Posts: 191
Joined: 18. Apr 2003 18:04

#3 Post by cc »

danke, aber wo hast du diesen code eingegeben ?

joersch

#4 Post by joersch »

Mahlzeit,

da bei mir mehrere (NameVirtualHost) domains auf dem server existieren,
in die jeweilige
<VirtualHost host.de>
...
zeugs für die domain host.de
.....

RewriteEngine on
RewriteLog logs/rew-host.log
RewriteRule ^/(.*)$ https://host.de/$1 [R,L]
</VirtualHost>

Gruss

cc
Posts: 191
Joined: 18. Apr 2003 18:04

#5 Post by cc »

bekomme follgende fehlermeldung:

Code: Select all

Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
welches apache module soll installiert sein ?

joersch

#6 Post by joersch »

Mahlzeit,

schaue mal in deinem apache-modules verzeichniss nach:
mod_rewrite.so

und ob es in der httpd.conf geladen wird:
LoadModule rewrite_module modules/mod_rewrite.so

Gruss

Post Reply