[thelist] IIS/URLs: IIS Directory Querystring

Eric Engelmann eric.engelmann at geonetric.com
Fri May 24 13:31:05 CDT 2002


<snip>
 -- I'm pretty certain that this is impossible in ASP, it works great in
CF, but ASP can't do anything in a 404.
</snip>

Its defitely doable in ASP. Set IIS to send 404s to /404.asp[*], say . Then,
you can do anything you want in 404.asp that you can on any other ASP page,
such as rewriting the URL search-engine friendly and redirecting.


<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>




More information about the thelist mailing list