I have a PHP site (which uses HTTPS) that pulls blog content HTML from an API.
Sometimes the blog content contains img
tags. In rare cases, the src
of an img
tag might point to an https URL that is a redirect to an http URL.
So when a visitor to my site loads the page, the browser (e.g. Firefox) says in the URL bar:
Connection is Not Secure
Parts of this page are not secure (such as images).
What can I do to ensure that my visitors always experience full https?
Is there some way that my PHP or javascript could preemptively detect that an img
src
would redirect to a http URL and simply omit that tag (prevent it from loading)?