Help...IIS, 404, and Request.ServerVariables("URL"

Results 1 to 3 of 3

Thread: Help...IIS, 404, and Request.ServerVariables("URL"

  1. #1
    Ed Guest

    Default Help...IIS, 404, and Request.ServerVariables("URL"

    I&#039;m trying to use write a script that automatically sends an email to our webmaster when a 404 error occurs on the site.<BR><BR>I&#039;m attempting to capture two things: the HTTP referer and the requested page. The HTTP referer is no problem; I simply use the Request.ServerVariables("HTTP_REFERER") object, and there&#039;s either a referring page or not. The REQUESTED page, however, is giving me some problems.<BR><BR>When IIS serves up our custom 404Error.asp page, the Request.ServerVariables("URL") object always returns "404Error.asp," as opposed to the incorrect URL that is visible within the location bar! I&#039;m using some client side javascript (location.href) in order to get that requested page value. There has to be an easier (and cleaner!), server-side way to do this?!<BR><BR>Thanks in advance,<BR>Ed

  2. #2
    Join Date
    Dec 1969

    Default RE: Help...IIS, 404, and Request.ServerVariables(

    ServerVariables("PATH_TRANSLATED") will give you the physical path of the current ASP page.

  3. #3
    Mike P. Guest

    Default RE: Help...IIS, 404, and Request.ServerVariables(

    Just curious, what good does the PATH_TRANSLATED command do? He already knows that the script is returing 404.asp which is his error page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts