grab ID# from address bar

Discussion in 'ASP General' started by Joey, May 25, 2007.

  1. Joey

    Joey Guest

    Joey, May 25, 2007
    #1
    1. Advertising

  2. Joey

    Joey Guest

    Ok, I pressed SUBMIT too quickly.

    So, I need to know how to grab 12345 if someone goes to
    www.mydomainname.com/12345. I also need to know what ASP page to create
    since there is no .asp at the end of the address bar. Is this is custom
    404 page?


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Joey, May 25, 2007
    #2
    1. Advertising

  3. Joey

    Evertjan. Guest

    Joey wrote on 25 mei 2007 in microsoft.public.inetserver.asp.general:

    > Ok, I pressed SUBMIT too quickly.
    >
    > So, I need to know how to grab 12345 if someone goes to
    > www.mydomainname.com/12345. I also need to know what ASP page to create
    > since there is no .asp at the end of the address bar. Is this is custom
    > 404 page?
    >


    Yes, you can use 404.asp if set in IIS,
    and if /12345 does not exist as a directory:

    <%

    qstr = Request.ServerVariables("HTTP_REFERER")

    if instr(qstr,":80/12345/")>0 then
    server.transfer "/mySecretDirectory/12345page.asp"
    end if

    %><html>

    <head>
    <title>404 - </title>
    </head>

    <body>
    <h1>this is the 404 page</h1>
    ..............

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., May 25, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,597
  2. John Hann
    Replies:
    0
    Views:
    6,164
    John Hann
    Aug 21, 2004
  3. Matt
    Replies:
    9
    Views:
    71,233
  4. axelman
    Replies:
    1
    Views:
    964
    bruce barker
    Jul 18, 2008
  5. Matt
    Replies:
    9
    Views:
    625
    kaeli
    Aug 23, 2004
Loading...

Share This Page