> 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_METHOD")
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.Count()
Response.Write "<input type=hidden name=" & _
Request.Form.Key(x) & " value=""" & _
Server.HTMLEncode(Request.Form.Item(x)) & _
""">" & vbCrLf
next
Response.Write "<input type=submit value=Go></form>"
Response.Write "<script>" & vbCrLf
Response.Write "document.f.submit();" & vbCrLf
Response.Write "</script>"
else
sQString = Request.Querystring
If Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
Response.Redirect sRedirect
end if
end if
function sv(s)
sv = Request.ServerVariables(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/