D
dave
Hello
I have one simple form (myform.asp) and it posts to query.asp
I had put below code in both file on top of the page to redirect this two
pages in https://
so any one can access it thru http , it changes to https://
if Request.ServerVariables("HTTPS") = "off" then
method = Request.ServerVariables("REQUEST_METHOD")
srvname = Request.ServerVariables("SERVER_NAME")
scrname = Request.ServerVariables("SCRIPT_NAME")
sRedirect = "https://" & srvname & scrname
sQString = Request.Querystring
if Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
if method = "POST" then
Response.Write "<form method=post action=" & _
sRedirect & " name='f'>"
for x = 1 to Request.Form.Count()
tname = Request.Form.Key(x)
tvalue = Server.HTMLEncode(Request.Form.Item(x))
Response.Write "<input type=hidden name=" & _
tname & " value=""" & _
tValue & """>" & vbCrLf
next
Response.Write "<input type=submit value=Go></form>"
Response.Write "<script>" & vbCrLf
Response.Write "document.f.submit();" & vbCrLf
Response.Write "</script>"
else
Response.Redirect sRedirect
end if
end if
but in myform.asp, it sth like this
<form method="post" action="query.asp"></form>
I'm just wondering whether its submits the form to query.asp via normal http
and then redirect and resubmit itself thru https or its really transmitting
form info via https:// (from myform.asp to query.asp)
or do i need put action="https://mydomain.com/query.asp" in the form tag...
Any help would be appreciated!!!
I have one simple form (myform.asp) and it posts to query.asp
I had put below code in both file on top of the page to redirect this two
pages in https://
so any one can access it thru http , it changes to https://
if Request.ServerVariables("HTTPS") = "off" then
method = Request.ServerVariables("REQUEST_METHOD")
srvname = Request.ServerVariables("SERVER_NAME")
scrname = Request.ServerVariables("SCRIPT_NAME")
sRedirect = "https://" & srvname & scrname
sQString = Request.Querystring
if Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
if method = "POST" then
Response.Write "<form method=post action=" & _
sRedirect & " name='f'>"
for x = 1 to Request.Form.Count()
tname = Request.Form.Key(x)
tvalue = Server.HTMLEncode(Request.Form.Item(x))
Response.Write "<input type=hidden name=" & _
tname & " value=""" & _
tValue & """>" & vbCrLf
next
Response.Write "<input type=submit value=Go></form>"
Response.Write "<script>" & vbCrLf
Response.Write "document.f.submit();" & vbCrLf
Response.Write "</script>"
else
Response.Redirect sRedirect
end if
end if
but in myform.asp, it sth like this
<form method="post" action="query.asp"></form>
I'm just wondering whether its submits the form to query.asp via normal http
and then redirect and resubmit itself thru https or its really transmitting
form info via https:// (from myform.asp to query.asp)
or do i need put action="https://mydomain.com/query.asp" in the form tag...
Any help would be appreciated!!!