• # Mod Rewrite

    Posté par . En réponse au message Apache2 : redirection HTTP -> HTTPS. Évalué à 10.

    <VirtualHost *:80>
    ServerName toto.lan
    CustomLog /var/log/apache2/toto-access.log combined
    ErrorLog /var/log/apache2/toto-error.log
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteLog /var/log/apache2/https_rewrite.log
    RewriteLogLevel 1
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^/(.*) https://%{SERVER_NAME}/1ドル [L,R]
    </IfModule>
    </VirtualHost>

    Devrait répondre à tes attentes, il faut avoir mod_rewrite bien sûr.