Skip to content

Instantly share code, notes, and snippets.

@brstp
Created December 13, 2011 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brstp/1471487 to your computer and use it in GitHub Desktop.
Save brstp/1471487 to your computer and use it in GitHub Desktop.
Custom error page for IIS to redirect to redirect dispatcher
<%
option explicit
Response.Buffer = true
dim sServerName
dim sURL
sServerName = lcase(Request.ServerVariables("SERVER_NAME"))
select case sServerName
case "web.friskissvettis.se": sURL = "http://omdirigera.se/404.html"
case else sURL = "http://whatever.tld"
end select
Response.Status = "301 Moved Permanently"
Response.addheader "Location", sURL
Response.End
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment