Results 1 to 5 of 5

Thread: Request.ServerVariables??

  1. #1

    Thread Starter
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329

    Lightbulb Request.ServerVariables??

    Which item in the ServerVariables object should be used to get the URL, including the query string? I want to be able to pass the exact URL to another script so it can return to the same place.

    However, the PATH_INFO, PATH_TRANSLATED, and URL items don't seem to have the query string included. Is there an item that only gets the querystring so I could attach it to one of the above?

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    QUERY_STRING

  3. #3
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306
    IF you go to the MSDN it will List All The ServerVariable Commands that you can use. It's one of my favorites in the MSDN Help.

  4. #4
    Frenzied Member seoptimizer2001's Avatar
    Join Date
    Apr 2001
    Location
    Toledo, Ohio USA GMT -5
    Posts
    1,075
    Just Request.QueryString will pull the entire query string. What you probably need is ...
    VB Code:
    1. strURL = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME") & "?" & Request.QueryString
    seoptimizer2001
    VB 6.0, VC++, VI, ASP, JavaScript, HTML,
    Perl, XML, SQL Server 2000

    If God had intended us to drink beer, He would have given us stomachs.


    Please use the [code] and [vbcode] tags in your posts!
    If you don't know how to use them please go HERE!


  5. #5

    Thread Starter
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329

    Thumbs up

    Thanks, that worked good.

Posting Permissions

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



Click Here to Expand Forum to Full Width