Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2003
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting address location

    Is there anyway to get the address bar location (http://thisserver.com/blah) through server variables? I know you can get the actual path (d:\blah...). I know I could just type it in, but I need it to be dynamic.

    Thanks
    jga
    ·JGADesign·

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Yeah, there isn't one variable that has all of it.

    But the four variables you'd need if you want to build a complete URL are:
    HTTPS (to determine if it is HTTP or HTTPS)
    SERVER_NAME (the www.domain.com part of it)
    SCRIPT_NAME (everything past the server name but before the querystring)
    QUERY_STRING (any query string if it exists)

    But depending on what your doing, you may only need some of those.

    This thread also might interest you: http://www.codingforums.com/showthread.php?t=9421
    Last edited by oracleguy; 07-22-2004 at 07:48 PM.
    OracleGuy

  • #3
    New Coder
    Join Date
    Oct 2003
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks! worked perfectly
    ·JGADesign·


  •  

    Posting Permissions

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