„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Nein, das ganze soll für webmail.* funktionieren.
Jede Domain reagiert auf webmail.* und springt nach Horde IMP (serviert also das was auf dem Server unter /var/www/horde/imp/ abgelegt ist); lege ich dort eine .htaccess datei mit den rewrite rules an kann ich dort zentral von http nach https switchen.
Nur 1 Change statt Dutzender.
Last edited by nautilusiii on 2010-10-01 22:38, edited 1 time in total.
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [L,R=permanent]
P. S. und bei Schwierigkeiten solltest Du das Rewrite Log aktivieren - das verrät eine ganze Menge, wenn man es nur "laut" genug stellt ;-)
Last edited by daemotron on 2010-10-01 22:48, edited 2 times in total.
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Mag sein dass das auch geht, aber wie ich bereits sagte liegts wohl eher dadran dass mod_rewrite nicht fliegt bzw die rewrite rules überhaupt nicht angezogen werden.
Wie gesagt - darüber gibt nur das Rewrite Log Aufschluss. Wenn da nichts auftaucht, ist was am LoadModule-Statement kaputt (sagt das Error Log was dazu?)
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Ist für den virtuellen Host AllowOverride gesetzt? Wenn nein, werden die Einstellungen in der .htaccess nicht wirksam...
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
<VirtualHost xxx>
ServerName horde.webmail
ServerAlias horde.webmail.*
ServerAdmin xxx
Include /etc/psa-webmail/horde/conf.d/*
UseCanonicalName Off
DocumentRoot /usr/share/psa-horde
Alias /horde/ /usr/share/psa-horde/
Alias /imp/ /usr/share/psa-horde/imp/
<Directory /usr/share/psa-horde>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_flag safe_mode off
php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa-webmail/horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:."
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_flag safe_mode off
php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa-webmail/horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:."
</IfModule>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>