Redirect to a connection that is not secure

posted May 16th 2005 at 1736 EDT in All, HTML

Internet Explorer 6.0 service pack 1 introuduced a bug where in one specific case, the setting “Warn if changing between secure and not secure mode” under the Advance tab of Internet Options is ignored. This bug is kindly discussed in Mirosoft Knowledge Base article 883740 but this solution isn’t.

The dialog box to the right which states “You are about to be redirected to a connection that is not secure. The information you are transmitting to the site may be retransmitted to a nonsecure site…” happens in the following scenario:

http page -> (POST login info) https page -> redirect (302) to http -> Internet Explorer gives dalog box -> (GET w/o login info) http page

Simple solution, it doesn’t like the redirect, so do it in a different method

Instead of the 302 redirect, give a 400 responce, and a meta-refresh tag. <meta http-equiv="refresh" content="0;url=http://jehiah.com/">

I should probably mention that Firefox has no problems with this at all, and in fairness to Microsoft, they do provide a “solution” to the problem in their knowledge base : edit the registry. But hello!! this is the internet we are talking about, that just won’t work.

11 Responses

  1. #1 Ireney Berezniak
    4 years, 9 months ago

    Thanks for the solution. Ireney loves you long time.

    Firefox forever! >8)

    ib.

  2. #2 Meeta Das
    4 years, 2 months ago

    I have not understood the solution that you have sepecified:

    “Instead of the 302 redirect, give a 400 responce, and a meta-refresh tag. “

    Can you please explain it,

    Thanks & Regards

  3. #3 Prasad
    3 years, 11 months ago

    The solution says that, instead of:

    Response.Redirect("http://www.yoursite.com");

    use the following:

    Response.clear();
    Response.Write ('<meta http-equiv="refresh" content="0;url=http://jehiah.com/">');
    Response.End();

    Hope I’m clear.

  4. #4 Ed
    3 years, 8 months ago

    Thank you so much for this. I got to the MS tech note first before this site and was breaking into a cold sweat at their solution.

    I didn’t understand the 302 / 400 response bit either so thank’s for clearing that up with some code Prasad.

  5. #5 Rahul Batra
    3 years, 6 months ago

    Thanks for this info. Now, i can easily resolve the bug filed against me :)

  6. #6 Kenny
    3 years, 5 months ago

    Thank you SO MUCH for this article! You have ended hours of frustration with my webapp.

    In case it wasn’t immediately clear from the above comments, the Response.Write(”") contains the meta tag specified in the main post. Don’t forget to escape your quotes (or use ControlChars.Quote in VB.NET).

  7. #7 George
    3 years, 5 months ago

    Like Meeta Das I have no idea what you are talking about.

    Your solutions need to be less techy for the rest of us, especially when you are number 3 on google search for:

    you are about to be redirected to connection

  8. #8 Srinivasan
    3 years, 3 months ago

    This is an Ultimate Solution. Thanks a lot

    Srini

  9. #9 jehiah
    3 years, 3 months ago

    You are welcome ;-)

  10. #10 EditFast
    2 years, 1 month ago

    This solution is good for web site developers but what about IE users? How can we get rid of this problem? I have searched all over the net and the only information I can find is the MS article/solution mentioned above. However, it specifically states that this is a solution for Windows XP and I am using Win2K. As far as I know there is no solution to this problem. Anybody got any ideas.

  11. #11 Yuri Neves Silveira
    1 year, 7 months ago

    God bless you.