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.

The .htaccess file will go in the glFusion public_html/ directory. This is the same location where your siteconfig.php file is located.

2017/03/10 07:29 · mark
glfusion/installation/sslredirection.txt · Last modified: 2017/03/10 01:30 (external edit)

Page Tools