Skip to content

Instantly share code, notes, and snippets.

@basith374
Created March 21, 2017 12:14
Show Gist options
  • Save basith374/23174f47047fb4a127e1e7c88c8c118b to your computer and use it in GitHub Desktop.
Save basith374/23174f47047fb4a127e1e7c88c8c118b to your computer and use it in GitHub Desktop.
laravel ssl redirect
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment