0

I developed a site with Laravel 5.4.

I just installed an SSL certificate and added this to my htaccess:

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

I also added this in my AppServiceProvider:

URL::forceScheme('https');

When I go to mysite.co.za it changes to https but when I go to my admin section: mysite.co.za/admin it does not and it shows me an 'i' icon instead of a lock icon on the address bar.

Clicking on the 'i' icon says the site is not secured.

My host reply: This is most likely a configuration issue where the site is using mixed content. I have no idea what they mean and how to fix it.

Can anyone help please?

Sigal Zahavi
  • 1,045
  • 2
  • 21
  • 42
  • 1
    “Mixed content” means you’re loading something on the page using `http://`, i.e. an image, style sheet, JavaScript file, etc. – Martin Bean Sep 26 '19 at 11:24
  • Thank you @Martin Bean, found and fixed – Sigal Zahavi Sep 26 '19 at 11:33
  • Actually, checking again, not totally fixed. For some reason when I look at the console I see my own site referenced as http but it is in files under: storage/framework/views/ with long number names, can I delete these files?. It also shows the AntiVirus I use: gc.kis.v2.scr.kasperskey-labs.com, not sure what is that doing there and how to remove it. – Sigal Zahavi Sep 26 '19 at 11:40
  • It shows Main origin: mysite.co.za with http and I don't have any links in my code like that. The ksapersky one is in the Non-secure origins section. – Sigal Zahavi Sep 26 '19 at 12:04
  • If I go to: mysite.co.za/bean with https entered manually, all is fine, if I don't add the https manually it gives the unsecure links – Sigal Zahavi Sep 26 '19 at 12:07
  • Ok, another try, if I manually put http in the address, it redirects to https but without http it just stays as is and becomes not secure. How do I redirect mysite.co.za to add the https to it? – Sigal Zahavi Sep 26 '19 at 12:29
  • I found out if I'm already logged in to the site and I go to mysite.co.za/admin with no http or www it does not redirect, otherwise it goes to secure login and all is secured. Is there a way to fix that? – Sigal Zahavi Sep 26 '19 at 12:43

1 Answers1

0

I found the solution on this post:

Laravel 5 - redirect to HTTPS

using na-98 answer.

Thank you

Sigal Zahavi
  • 1,045
  • 2
  • 21
  • 42