Single Blog

HTTPS redirect Apache – Direct your website users with your htaccess

December 21, 2016, Written by 6 comments

If you have an SSL Certificate on your website, you can automatically HTTPS Redirect Apache for your visitors to ensure their connection communication is encrypted.

GeoTrust SSL Certificates Comodo SSL Certificate Symantec SSL Certificates

HTTPS Redirect with Apache

You will need to create or modify the .htaccess file. If you currently do not have one, you can create one using your control panel’s file manager.

Add the following code to your .htaccess file:

RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteCond %{HTTP_HOST} ^(www.)?$ [NC]
RewriteRule ^${REQUEST_URI} [R=301,L]

You will need to replace with your domain. If you are using http:// without www. in your platform, then remove www. from the code.

If you already have code in your .htaccess file, it is important that you place the above code at the beginning otherwise you will cause unnecessary loops which will cause 404 errors.

James Ensor

  1. 2fastness
  2. gay porn video chat
  3. best gay dating site
  4. gay teens chat
  5. chat gay joven tu chat
  6. gay dating suites in fresno
  7. Comments are closed.