Skip to content

Instantly share code, notes, and snippets.

@adeonir
Created December 23, 2016 14:10
Show Gist options
  • Save adeonir/6cd00ecfadee72a679f560b9b6dcba2a to your computer and use it in GitHub Desktop.
Save adeonir/6cd00ecfadee72a679f560b9b6dcba2a to your computer and use it in GitHub Desktop.
CakePHP .htaccess configuration for HTTPS
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment