Redirect all unencrypted traffic to HTTPS in Apache

To redirect all HTTP traffic to HTTPS administrators are encouraged to issue a permanent redirect using the 301 status code. When using Apache this can be achieved by a setting such as the following in the Apache VirtualHosts config:
<VirtualHost *:80>
   ServerName example.com
   Redirect permanent / https://example.com/
</VirtualHost>

Comments

Popular posts from this blog

Web Servers Load balancing with HAProxy

Using nginx as http load balancer