How to redirect url from http to https in laravel website and API via htaccess

Add the below line inside “.htaccess” file after “RewriteEngine On” from your root directory.

RewriteCond %{HTTPS} !on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *