<% Option Explicit Dim sRedir, sDomain, sDebug sDebug = Trim(Request.QueryString("debug")) IF (UCase(LEFT(Request.ServerVariables("HTTP_HOST"),4))<>"WWW.") THEN sDomain = "www." & LCase(Request.ServerVariables("HTTP_HOST")) ELSE sDomain = LCase(Request.ServerVariables("HTTP_HOST")) END if 'IF(UCase(Request.ServerVariables("HTTPS"))="OFF") THEN ' sRedir = "http://www." & sDomain & Request.ServerVariables("HTTP_REFERER") 'ELSE ' sRedir = "https://" & sDomain & Request.ServerVariables("HTTP_REFERER") 'END IF sRedir = Request.ServerVariables("HTTP_REFERER") if ((LCase(LEFT(sRedir, 11))<>"http://www.") and (LCase(LEFT(sRedir, 12))<>"https://www.")) then if (LCase(LEFT(sRedir, 11))<>"http://www.") then sRedir = Replace(sRedir, "http://", "http://www.") end if if (LCase(LEFT(sRedir, 12))<>"https://www.") then sRedir = Replace(sRedir, "https://", "https://www.") end if else sRedir = "" end if if trim(sRedir)<>"" then if Len(TRIM(sDebug))<1 then%> document.location.replace("<%=sRedir%>"); <%else%> var bConfirm = confirm("Redirecting to '<%=sRedir%>'.\n Proceed?"); if(bConfirm) { //top.document.location.replace("<%=sRedir%>"); document.location.replace("<%=sRedir%>"); } <%end if end if %>