glFusion Wiki

Site Tools


SSL Redirection

If you have setup your site to run under SSL, you may need to redirect all non-SSL (i.e.; http) requests to the SSL (i.e.; https) URL.

SSL Redirection using .htaccess

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

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

If you have an existing .htaccess file:

Do not duplicate RewriteEngine On.

Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.

2017/04/12 21:09
glfusion/installation/sslredirection.txt · Last modified: 2017/04/12 21:11 (external edit)

Page Tools