How to redirect HTTP website to HTTPS in Laravel?
Jan 03, 2019 - by kurinchilamp / / Post Comment
In order to force redirection of your website developed in Laravel from HTTP to HTTPS, you can try adding the following rules in .htaccess file.
<fModule mod_rewrite.c>
Options -Indexes
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Next, look at .env file and modify the value for APP_URL parameter
APP_URL=https://yoursite.com
Continue Reading