> Here is my slightly modified version of that though:
Nice touch. I'll do you one better, though. :-)
This version will also correctly transfer variables that came in to the page
using the POST method.
<%
if sv("HTTPS") = "off" then
method = sv("REQUEST_MET HOD")
srvname = sv("SERVER_NAME ")
scrname = sv("SCRIPT_NAME ")
sRedirect = "https://" & srvname & scrname
if method = "POST" then
Response.Write "<form method=post action=" & _
sRedirect & " name='f'>"
for x = 1 to Request.Form.Co unt()
Response.Write "<input type=hidden name=" & _
Request.Form.Ke y(x) & " value=""" & _
Server.HTMLEnco de(Request.Form .Item(x)) & _
""">" & vbCrLf
next
Response.Write "<input type=submit value=Go></form>"
Response.Write "<script>" & vbCrLf
Response.Write "document.f.sub mit();" & vbCrLf
Response.Write "</script>"
else
sQString = Request.Queryst ring
If Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
Response.Redire ct sRedirect
end if
end if
function sv(s)
sv = Request.ServerV ariables(s)
end function
%>
(With the obvious disclaimer that the post method won't work for William
Tasso. :-))
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/