Can ASP accomplish this?

Results 1 to 2 of 2

Thread: Can ASP accomplish this?

  1. #1
    Michael Gorman Guest

    Default Can ASP accomplish this?

    I am trying to accomplish the following using ASP, and I am wondering if it is possible.<BR> <BR>I would like the URL,, to work as follows.<BR> <BR>"abc123" is a tracking code, and "x" is a script that process the the tracking code and redirects the browser.<BR> <BR>I currently have it working where "x" is a perl script that sits in the web site&#039s root directory.<BR>That script is able to get the tracking code (abc123) by looking at $ENV{&#039PATH_INFO&#039}.<BR>Also I believe the default file type for the web site&#039s root directory is CGI, so that "x" will be<BR>recognized as an executable script by default without a .cgi or .pl extension.<BR> <BR>An example of this working is at<BR><BR><BR>I need to get ASP to accompish the same thing, but cant&#039 get it working.<BR><BR>I have two identical scripts setup "x.asp" and "x" that basically just contain the followign code.<BR><BR>&#060;% ref_code=Request.ServerVariables("PATH_INFO")<BR> Response.Write ("response code = " & ref_code)<BR>%&#062;<BR><BR> - returns "/mfgorman/x.asp" as the path info<BR> - returns a 404 - file not found<BR> - returns a blank page<BR> - returns 404 - file not found<BR> <BR>So can this be accompished with ASP?<BR><BR>Can I name an ASP script "x" and have it run, or must all ASP scripts have a .asp extension?<BR> <BR>Also I am also concerned with what ASP returns as the path info. In the CGI world the path info is<BR>whatever appears in the url after the name of the script. While ASP seems to define path info as<BR>anything after the server name.<BR> <BR>Any suggestions or solutions would be greatly appreciated.<BR> <BR>Mike Gorman<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Not ASP question, per se...

    It is a web server question: What does the web server *do* when a page is not found?<BR><BR>You *can* do this on an IIS server by setting up a custom 404 error handling page...and I think that can even be an ASP page, incidentally.<BR><BR>I suspect that is exactly what is happening in CGI, excepting that CGI is preconfigured for that kind of response. <BR><BR>

Posting Permissions

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