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

Install Nginx With PHP And MySQL On CentOS 7

Some common php modules