Apache Web Server Links & Tips
Links
Tips
Redirect to https if the request is not from localhost
RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
apacheblog:apache:apache_links
RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
Discussion