Retourner au contenu associé (entrée de forum : Apache2 : redirection HTTP -> HTTPS)
Posté par Xarli le 12 juillet 2005 à 13:18. En réponse au message Apache2 : redirection HTTP -> HTTPS. Évalué à 10.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Mod Rewrite
Posté par Xarli . En réponse au message Apache2 : redirection HTTP -> HTTPS. Évalué à 10.
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.