Forum Moderators: open

Message Too Old, No Replies

IIS URL-404 acting like file- or standard-404

         

tafkar

10:16 am on Mar 26, 2004 (gmt 0)

10+ Year Member



Hi ppl,

I'm not sure if this particular issue has been discussed before, so I'll just ask away. Please bear with me ;-)

I'm using IIS5 and have a URL as a custom 404.
Obviously IIS hands out a 200 as a response when sending out this custom 404 and writes the 200 into the log.
This is really not the behaviour I desire so I added a Response.Status = "404 Object Not Found" to my custom 404 asp file.
This seems to fix the response issue, but on the other hand IIS still logs only the URL of the custom 404 page instead of the not-found URL and the referring URL.
I'd like to see in my logfiles which URLs get requested and produce a 404 and which was the referring URL (if there was any). I mean I want the same behaviour as I would have if I set the 404 to file or standard.

Any ideas?

cheers
tafkar

samtheman

4:54 pm on Mar 30, 2004 (gmt 0)



might sound silly, im not good at asp but could u redirect to the file as?badurl=<%BADURL%>

and set that bad url is the referer.

and then request and use a scirpt to email it to u.

tafkar

5:50 am on Mar 31, 2004 (gmt 0)

10+ Year Member



Hi samtheman,

thanks for your input. I already had that idea myself. But this would be only a workaround and not really the solution.

If I had all the 404s emailed to me I'd be flooded with tons of emails generated by those traversal attackers / script kiddies that already flood my logfiles.

My main purpose is to have a quick overview of what is a real 404 (i.e. someone might have bookmarked a non-existing URL or I forgot an orphaned link) and what is just white noise generated by attacking attempts.

My log analyser (awstats) is quite capable of just doing that for my other sites where I use a standard or file 404, i.e. where IIS generates "proper" log file entries. So that's what I'd like to have that as well for my URL 404.

cheers
tafkar

GeorgeS

10:55 pm on Mar 31, 2004 (gmt 0)

10+ Year Member



why don't you want to use server variable HTTP_REFERER and insert invalid URLs into table before redirecting?