[thelist] IIS/URLs: IIS Directory Querystring

Eric Engelmann eric.engelmann at geonetric.com
Fri May 24 14:11:01 CDT 2002


Yeah, this wouldn't be the most elegant way to do it. But then, the issue in
question is to intentionally use 404s to redirect every page in a site -
which is a hacked up architectural concept to begin with, not necessarily
ASP per se. The way this should work, is, as has been mentioned, with IIS to
intercept all request and translate it before ASP (or the concept of a 404)
gets involved.

If the question is, can ASP redirect from a custom 404 to another page by
parsing through the querystring (even if it is fugly! No disagreement!) the
answer is that it can.

By the way - IIS 4 does return the full original querystring in
Request.ServerVariables("QUERY_STRING") if you had to parse through it to
rewrite the URL, I wasn't sure if/how it came through in my tip.



-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Aaron Johnson
Sent: Friday, May 24, 2002 1:54 PM
To: thelist at lists.evolt.org
Subject: RE: RE:[thelist] IIS/URLs: IIS Directory Querystring


> <tip type="IIS: Handling custom 404s">
> * In IIS, open the website properties, go to Custom Errors. Open the
listing
> for 404, and make it a URL - not file - and put the relative path to the
404
> handler page, say, "/404.asp" (without qoutes). Then apply and exit. All
> 404s will go to that page, and you can parse the Querystring, I think, for
> the referred page (not sure if HTTP_REFERER will work) and perform any ASP
> functions you'd like.
> </tip>
-- Course, it looks fugly when you do this... using your tip, if I try
to access a page, say /aaron.asp, which doesn't exist, IIS will then
redirect to

/404.asp?404;http://myserver/aaron.asp

Fugly.

And what do you do then? Use the 404 to redirect to another page? so
you'd end up with a connection workflow like this:

user connects to http://myserver/aaron.asp

IIS redirects user to using a 302 header http://myserver/404.asp

user connects to http://myserver/404.asp

404.asp redirects to your custom page...

Thats a lot of work on the server, more connections for the client, and
pretty inefficient.  Definitely technically possible, but is it a viable
solution?  IMHO, I don't think so.

AJ


>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>


--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list