Mark McGinty wrote on 01 jan 2007 in
microsoft.public.inetserver.asp.general:
What exactly would you expect this to do in an .HTML file?
Unless you
mapped the .html extension to asp.dll, to process files with that
extension as server-side script, the correct answer would be
"nothing".
True. My mistake, read:
http://www.??.??/mypage.asp
IIS can remap [about?] any extention to be read by the asp interpreter.
============= /404.asp ====================
<%
qstr = lcase(Request.ServerVariables("QUERY_STRING"))
if instr(qstr,":80/virtualdir/")>0 then
session("qstr")=qstr
server.transfer "/anydirectory/page.php"
[..]
The .php, could be anything, I prefer page.asp
However, my real [in my view] answer was this use of 404.asp.
The extention of the nonexisitng [=virtual] pages does not matter here,
the asp interpereater is always "on".
The page.asp could be something like this:
[on my site, even Google sees this page as 110 different ones]
=========== /anydirectory/page.asp ================
<html>
<head>
....
</head>
<body>
<% if instr(session("qstr"),"/virtualdir/xxx.html")>0 then %>
<b>This</b> is the content of xxx .............
<% elseif instr(session("qstr"),"/virtualdir/blah.qrs")>0 then %>
<b>This</b> is the content of blah .............
<% elseif instr(session("qstr"),"/virtualdir/otherext.asp")>0 then %>
<b>This</b> is the content of <%=session("qstr")%>:
.............
<% else %>
Page not found [404]
</body>
</html>
<%
session("qstr") = ""
response.end
end if
session("qstr") = ""
%>
<br>General footer [except for not found 404] .........
</body>
</html>
=====================================================
To make it really perfect, you would have to make dynamic headers
of the 200 and 404 kind.