Created
June 14, 2011 08:19
-
-
Save brstp/1024514 to your computer and use it in GitHub Desktop.
A custom 404 error page for IIS with redirection of changed urls. http://www.lumano.se/Artiklar/OmdirigeraNarDuFlyttarSidan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
option explicit | |
Response.Buffer = true | |
dim sServerName | |
dim sURL | |
sServerName = lcase(Request.ServerVariables("SERVER_NAME")) | |
select case sServerName | |
case "www.oldgreenplus.com": sURL = "http://www.new-site.com/template/Page____8466.aspx" | |
case "www.oldgreen.com": sURL = "http://www.new-site.com/template/Page____8466.aspx" | |
case "www.oldbrown.com": sURL = "http://www.new-site.com/template/Page____7320.aspx" | |
case "www.olddecor.com": sURL = "http://www.new-site.com/template/Page____7319.aspx" | |
case "www.old-e.com": sURL = "http://www.new-site.com/template/Page____7818.aspx" | |
case "www.oldcopper.com": sURL = "http://www.new-site.com/default____6763.aspx" | |
case "oldcopper.com": sURL = "http://www.new-site.com/default____6763.aspx" | |
case "www.oldtechnology.com": sURL = "http://www.new-site.com/default____6764.aspx" | |
case "oldtechnology.com": sURL = "http://www.new-site.com/default____6764.aspx" | |
case else sURL = "http://www.new-site.com" | |
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