简体   繁体   中英

Site not redirecting to http from https

So in my site I make an xml grab that pulls a url that I then redirect to.

The issue im having is im getting a mixed content error.

was loaded over HTTPS, but requested an insecure resource 'http://****'. This request has been blocked; the content must be served over HTTPS.

I'm using aspx.vb & JS. my js looks like:

if (url != '') {
            setTimeout(function () {
                window.top.location = url;
            }, 1500);
        }

and my aspx grabing the xml looks like:

xml.SelectSimpleNode("this/url").InnerText

Simples. I havent heard of mixed content errors on redirects links before. Its not like im grabbing an image.

I suppose a solution could be to strip anything beffore :// out of the url and just get it to load without dictating but im not sure this will help.

Any ideas as to why a redirection would cause a mixed content error?

If you are using HTTPS then you shouldn't be redirecting to any URL that is not HTTPS because the request will not be secure. You should check if the URL has HTTPS and if not, add it.

If the target site does not support HTTPS then you can't do much.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM