mardi 2 janvier 2018

from http to https with Laravel 5.4

Hi I have correctly configured laravel on my hosting, however the site is reachable both from:

http://hello.com
https://hello.com

Reading many guides, they advise to put this in app\Providers\AppServiceProvider.php

\URL::forceScheme('https');

But by doing so, I receive all the url of the page in HTTPS (css,js,image...), but the user continues to stay on an http page... How can I do?

I also tried with the htaccess

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://hello.com/ [R,L=301]

But if I am in: http://ift.tt/2Ext4Zc

he redirects me to: http://ift.tt/2DNFStl

creating a problem even for assets:

  <link href="http://ift.tt/2EBFcIE" rel="stylesheet">

how do I correctly configure the redirect to the https protocol?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qfSZBo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire