mercredi 15 août 2012

redirection http https

exemple 1 de redirection de http://xxxxx/ABCPresentationWeb/    -> https://xxxxx/ABCPresentationWeb/


<IfModule mod_rewrite.c>
######################################
#   REDIRECTION VERS LA PAGE HTTPS   #
#    Changer la valeur On / Off      #
####################################################
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
RewriteRule ^/$ https://xxxxx/ABCPresentationWeb/ [L,R]
RewriteRule ^/(.*)PresentationWeb/(.*) https://xxxxxx/ABCPresentationWeb [L,R]
</IfModule>




exemple 2 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ https://xxxxx/ABCPresentationWeb/
</IfModule>

exemple 3

RewriteEngine On
############################################################################
#         REDIRECTION PERMANENTE VERS L URL SECURISEE                      #
############################################################################
RewriteCond  %{HTTP_HOST} xxxxx.echonet
RewriteRule ^/fact/$  https://xxxxx.echonet [L]
############################################################################