Skip to content

Instantly share code, notes, and snippets.

@alvarosacari
Created August 16, 2019 21:41
Show Gist options
  • Save alvarosacari/c40cf7f0bd584f648109c8ef95c3f056 to your computer and use it in GitHub Desktop.
Save alvarosacari/c40cf7f0bd584f648109c8ef95c3f056 to your computer and use it in GitHub Desktop.
Force SSL to codeigniter 3
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>
$config['base_url'] = 'https://my.domain/';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment