'-------------------------------------------------------------------------------- 'generic 301 redirect sub 'requires global variables: gb301redirect , gs301redirectprotocol 'gs301redirecthost , gs301redirectpathandscript and gs301redirectqs '-------------------------------------------------------------------------------- sub sysexec301redirect() dim s301redirecturl if gb301redirect = true then '301 redirect is enabled 'check that all needed information were provided if gs301redirectprotocol <> "" and gs301redirecthost <> "" and _ gs301redirectpathandscript <> "" then s301redirecturl = gs301redirectprotocol & gs301redirecthost s301redirecturl = s301redirecturl & gs301redirectpathandscript if gs301redirectqs <> "" then 'querystring s301redirecturl = s301redirecturl & "?" & gs301redirectqs end if response.status = "301 moved permanently" response.addheader "location", s301redirecturl response.end end if end if end sub