I am trying to figure out that why my sub domain website works fine with Http but not when its https. Is there SSL certification problem.
-
Check your developer tools console (press F12) for errors regarding HTTP/HTTPS errorschrki– chrki2017-07-16 16:47:12 +00:00Commented Jul 16, 2017 at 16:47
-
yes it shows I am trying to access a non-secure http//{path} on https loaded page, so I guess changing HTTP to HTTPS will work fine?Satyam Pathak– Satyam Pathak2017-07-16 16:52:10 +00:00Commented Jul 16, 2017 at 16:52
-
Yes that should be it, but these other servers need to support HTTPS as well.chrki– chrki2017-07-16 16:55:01 +00:00Commented Jul 16, 2017 at 16:55
-
thanx :) issue is resolvedSatyam Pathak– Satyam Pathak2017-07-16 16:57:04 +00:00Commented Jul 16, 2017 at 16:57
2 Answers
You have a bunch of scripts that are linking with http. Browsers won't run these on a secure page. You need to change the links to https:
<script src="http://bloodsuvidha.vampy.in/js/bootstrap.min.js" type="text/javascript"></script>
This is also true with stylesheets:
<link rel="stylesheet" type="text/css" href="http://bloodsuvidha.vampy.in/css/bootstrap.min.css">
3 Comments
The answers given till now are correct but none solved my problem.
The main problem was my application was behind CloudFlare
Laravel detects a Request as secure or insecure by checking a HTTP header i.e.
$_SERVER['REQUEST_SCHEME']
which remains HTTP even the Request is HTTPS due to cloudflare.
CloudFlare sets a different header for the same i.e.
$_SERVER['HTTP_X_FORWARDED_PROTO']
Which must be checked to detect a request is secure or not
Following this article and making some changes to this I successfully managed to generate HTTPS URL without making any changes to previous application code.
Credit Cybersupernova (Stack User )
