Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Redirect URLs to use SSL TLS

Elías Torres edited this page Dec 15, 2020 · 3 revisions

Enable Secure access (SSL/TLS) with .htaccess file (https in the URL)

Prerequisites

  • Make sure you have a SSL certificate installed in your site: your site should be able to show the same content using http:// or https:// in all URLs.
  • Decide if you need a Wildcard SSL Certificate: you'll need this only if you plan to use Newtons (session IDs in the URL) you will need a wildcard SSL certificate, ask your hosting provider for help.

Edit .htaccess files:

Add the following lines to sblogin/.htaccess

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=307]

<IfModule mod_headers.c>
    Header set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>

After that you may want to add it to your main .htaccess file under your document root.

Clone this wiki locally