?
Solved

page 404 error without referring url

Posted on 2010-01-12
5
Medium Priority
?
453 Views
Last Modified: 2012-05-08
Hi all,
I've written as custom 404.asp page, which works fine - most of the time!  It emails the page error to me including the page name, which is obtained from:
request.servervariables("http_referer") and request.serverVariables("Script_Name")

However, on a regular basis I'm getting email because of a 404 error where the request.servervariables("http_referer") is blank - so I can't track down what is causing the error?!

Any ideas as it is driving me nuts!?

Regards

JamWales
0
Comment
Question by:Jamie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:yonatanz
ID: 26295998
Hi JamWales,

This probably happens because the client browser did not specify a Referrer HTTP header.
While most browsers will specify such a header, some might not in some cases.

A few such conditions come to mind:
1. A user clicked a link in their favorites (or bookmarks), hence there is no referrer
2. A user typed the URL directly, again there is no referrer
3. The user's browser is set not to pass referrer information.
4. A non-mainstream user-agent was used (maybe a crawler bot, or some other non-browser program)

Depending on your website, and the non-existing page, any of the above or other causes may be possible.
Maybe looking at request.servervariables("HTTP_USER_AGENT") will give you more insight?
0
 

Author Comment

by:Jamie
ID: 26296187
Hi yonatanz,
Many thanks for your reply. I've changed the email to include all request.servervariables - see what then next blank http_referer brings via the other request.servervariables say - should get one in about 5 minutes!
Regards
JamWales
0
 

Author Comment

by:Jamie
ID: 26297141
Hi yonatanz,
Looked at the request.servervariables  - and the QUERY_STRING  it refers to does not appear in the page it references, anywhere, both visually and in the code behind?!?
I'm still at a total loss?
Regards
JamWales
0
 
LVL 1

Expert Comment

by:yonatanz
ID: 26300768
Hey there JamWales,
I suppose you looked carefully at the server variables and couldn't figure out a possible cause.

Can you show me those variables? maybe obfuscate any sensitive information after you copy-paste.
0
 

Accepted Solution

by:
Jamie earned 0 total points
ID: 26301169
Hi yonatanz:
Thanks for your reply. I woke up this morning - at 5am with a thought!
I turned off my custom error 404 page, and the errors returned pointed me to the exact problem - so all is sorted now. Not sure why my custom 404 did not give the same info - but that's life I suppose.
Thanks for all your input.
Regards
JamWales
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question