404 error produces 302 response

N

nutso fasst

Hello.

IIS 4 website with a custom 404 error page WAS working OK, but at some
point it wacked out. In the logs there were no 404 error responses. Instead,
what were recorded were 200(OK) responses with my custom 404 page.

Researching, I found that when a non-existent resource was requested,
instead of directly responding with the 404 error page, the server responded
with 302 (Found / Moved
Temporarily) and a redirection to my custom error page. The redirection URL
had a querystring added, e.g.:
http://mysite.com/my404.asp?404;http://mysite.com/nofile.htm

I added Response.Status = "404 Not Found" at the top of the error page to
ensure a 404 response, but the redirection and logging anomaly continued.

I went back to the default .htm error page and behavior returned to normal.

I noticed that my404.asp called a component and wondered if that could be
the problem. So I edited, then specified that page for 404 error. Strangely,
it seemed to work OK initially but quickly reverted to bad behavior. So I
switched back to an HTML error page.

This website is a physically-congruent subset of another website and shared
the asp error page so I though that might be the problem. But when I gave
the other site a different copy of the error page the problem not only
persisted, the second site began exhibiting the same behavior.

All's OK using HTML error files, but I'm curious if anyone has a clue as to
the cause/cure of the bad behavior with ASP.

thanks,
nf
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top