Answers for "force https htaccess on laravel"

PHP
1

redirect http to https htaccess laravel 8

<IfModule mod_rewrite.c>
    RewriteEngine On        
  RewriteCond %{HTTPS} !=on    
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  RewriteRule ^(.*)$ public/ [L]
</IfModule>
Posted by: Guest on April-15-2021
4

laravel ever over https

//Place this in the AppServiceProvider in the boot() method
if($this->app->environment('production')) {
    \URL::forceScheme('https');
}
Posted by: Guest on January-05-2022

Browse Popular Code Answers by Language