PHP Laravel Redirect HTTP Requests To Https SSL

09-01-2020

Laravel redirect all HTTP request to HTTPS request via .htaccess file:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ /public/$1 [QSA,L]
</IfModule>

© 2019 All rights reserved. Codesenior.COM