How to make one file redirect to another?

Asked

Viewed 903 times

0

A HTTPS page of mine is requiring me to only link to HTTPS resources. Otherwise, HTTPS warning messages appear. I wanted it to be possible to download a file from the site, without appearing any warning message to the user. Only I need to save the file in another location that only serves HTTP. Can you create a file on the HTTPS server that redirects the download to be downloaded from the HTTP server?

  • What you’re referring to is putting a file on an HTTP server and loading it using a <script> on an https page? If it is a normal download no error would occur.

  • 5

    It is the obligation of the browser to let me know when I am on a secure connection and the site redirects me or tries to include something unsafe. Don’t try to circumvent security. Instead, include the desired features on a secure connection as well.

  • On Chrome: '[blocked] The page at 'https://. com/' was Loaded over HTTPS, but Ran insecure content from 'http://. com/': this content should also be Loaded over HTTPS.'

  • @utluiz I am testing on here and no browser is giving this alert for downloads, only for script. After that last #Jader-dias comment it seems that it actually refers to a script: do what #utluiz said.

  • @Gustavorodrigues has no script involved. Your security settings should be more relaxed than mine. I have "HTTPS Everywhere" but it’s not active. I think the problem is my company’s Group Policies

1 answer

1


The solution is simple. In the link that will open the file, use target="_Blank"

<a href="aqruivo.xxx" target="_blank">download</a>
  • 1

    This is to open in another tab, not to redirect the download

  • 1

    @Jaderdias if you want the download to happen outside of HTTPS, you will have to start another window, there is no way.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.