%@Language=JScript%>
<% var Title = "Neil's Stuff"; var ToUrl = "http://www.neilstuff.com"; var Note = ""; var Known = true; var p = -1; if (Request.QueryString("p").Count > 0) p = parseInt(Request.QueryString("p").Item(1)); if (Request.QueryString("uq").Count > 0) { switch (Request.QueryString("uq").Item(1)) { case "cpp": p = 1; break; default: Known = false; break; } } switch (p) { case -1: case 0: Note = " (home page)"; ToUrl += "/"; break; case 1: Title = "Neil's C++ Stuff"; ToUrl += "/cpp/"; break; case 36: Title = "Neil's Guide to C++"; ToUrl += "/guide_to_cpp/"; break; case 55: Title = "Neil's C++ Stuff - Pointer Variables"; ToUrl += "http://www.neilstuff.com/cpp/pointers.htm"; break; case 56: Title = "Neil's C++ Stuff - Structures"; ToUrl += "http://www.neilstuff.com/cpp/structs.htm"; break; default: Known = false; ToUrl += "/"; break; } %>I apologize, but you've followed a bad link. <% if (Known) { %> I think you meant to go to <%= Title %><%= Note %> which is actually located at <%= ToUrl %>. <% } else { %> I'm not sure where you were supposed to be taken, but try the home page of this site for a table of contents. Please email me if you have trouble finding what you're looking for. <% } %>
I encourage you to tell the referring site their link is incorrect, and to
update it. In the future, a link to a folder or HTML file is most timeless.
Yes, I know this is my fault for ever having horrible URL's like
http://<%= Request.ServerVariables("SERVER_NAME") %><%= Request.ServerVariables("SCRIPT_NAME") %>?<%= Request.ServerVariables("QUERY_STRING") %>
,
but forgive my lapse in judgement;
I was young and reckless.
Thanks! -- NeilO