NYCPHP Meetup

NYPHP.org

[nycphp-talk] Fix for IE Security Alert " You are about to be redirected to a connection that is not secure"

Cliff Hirsch cliff at pinestream.com
Sat Jun 16 10:38:26 EDT 2007


On 6/16/07 8:24 AM, "Cliff Hirsch" <cliff at pinestream.com> wrote:

> On 6/16/07 12:00 AM, "Allen Shaw" <ashaw at polymerdb.org> wrote:
> 
>> Cliff Hirsch wrote:
>>> When redirecting from a secure login page to a non-secure page after logging
>>> in, Internet Explore pops up the following security alert:
>>> 
>>> ³You are about to be redirected to a connection that is not secure"
>>> 
>>> Doe anyone know how to prevent this?

I found an ASP fix: http://www.codeproject.com/useritems/switchprotocol.asp

Implement Tranz.aspx, which takes care of the script-block redirect:

<%@ Page Language="C#" Theme="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e) {
   _to = Server.UrlDecode(Request.QueryString["to"]);
}
private string _to;
protected void js() {
   Response.Write("window.location.replace(\"" + _to + "\");");
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script type="text/javascript" language="JavaScript">
<!--
<% js(); %>
-->
</script>
<title></title></head><body></body>
</html>

Don't know what this does. Anyone have a PHP equivalent?





More information about the talk mailing list