Custom 404 Page

M

Matt

I notice that when you have the defualt setup of 404 error
pages the IIS 5.0 log tracks the page the user was trying
to get to and the page they where at when they tryed to
get to the now missing page. I recently wrote my own 404
error page to make it match my site but when I set IIS to
use my custom page it no longer traks the page that the
user was trying to get. I was told I needed to add some
code to my page to fix this, but I don't know what code to
add. Can someone tell me? (I am useing ASP on the custom
404 error page) I am returning a 404 error response,
everything works fine it is just that IIS does not log
what page the user was trying to get to.
 
I

IPT

Make sure your 404 custom page is .asp and inside you script, you use this
code:
Response.Write Request.ServerVariables("HTTP_REFERER")

This should work.
 
M

Matt

It is a .asp page and a response.write writes info to the
screen, I need it written to the server log.
 
M

Matt

That FAQ has nothing to do with written information to the
log. That just the info to the web page, I need the log
 
G

Guest

I talked about both things, if you read my post you will
see I tell you how my 404 \page is being done (using ASP
and returning a 404 error rsponse) and that the issues is
some info is not being written to the log. I can't keep my
own log since my web site stats porgame reads from the iis
log. I looked at the link you gave me but it talks about
writting to the event log using com objects, axtivex
controlls, and full VB code none of which I know. Plus I
need to write to the IIS log not the windows event log
(which, from what my host tells me, are two differant
things). Can you tell me how to write to the IIS log the
information I am missing (the page the user was trying to
get to when they got the 404 error)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top