I have a Centos 6.7 with apache 2.2.15. I want to redirect all traffic from port 80 to 443 with one exception. The traffic who come from localhost I want to remain on port 80. Now I use this config but I don't know how to change itRewriteEngine OnRewriteCond %{HTTPS} !onRewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
Apache redirect to https if the request is not from localhost
centos;apache httpd;https;rewrite;virtual host