<% function curPageURL() dim s, protocol, port if Request.ServerVariables("HTTPS") = "on" then s = "s" else s = "" end if protocol = strleft(LCase(Request.ServerVariables("SERVER_PROTOCOL")), "/") & s if Request.ServerVariables("SERVER_PORT") = "80" then port = "" else port = ":" & Request.ServerVariables("SERVER_PORT") end if curPageURL = protocol & "://" & Request.ServerVariables("SERVER_NAME") &_ port & Request.ServerVariables("SCRIPT_NAME") end function function strLeft(str1,str2) strLeft = Left(str1,InStr(str1,str2)-1) end function tmp = curPageURL()&"?"&Request.ServerVariables("QUERY_STRING") tmp = Replace(tmp,"Default.asp","") tmp = Replace(tmp,"default.asp","") Response.Status = "301 Moved Permanently" Response.AddHeader "Location",tmp 'Response.Redirect tmp %>