0

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.

enter image description here

4
  • Check your developer tools console (press F12) for errors regarding HTTP/HTTPS errors Commented 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? Commented Jul 16, 2017 at 16:52
  • Yes that should be it, but these other servers need to support HTTPS as well. Commented Jul 16, 2017 at 16:55
  • thanx :) issue is resolved Commented Jul 16, 2017 at 16:57

2 Answers 2

1

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">
Sign up to request clarification or add additional context in comments.

3 Comments

Thanx :) i appreciate your answer
I am on a laravel project, i use "url('path')" which automatically creates the url path. It doesnt worked for me
I don't know anything about laravel. You should mark this answer as correct for this question and ask a different one about the laravel problem.
0

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 )

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.