SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting All Globals

    Hi guys&gals,

    basicly what I want to do is get all global variables that are set. The reason for this is I am moving a forum to another folder. I want people to redirect to this new directory, but I also want them to go to the page that they wish to visit. So, I need some method of getting any data that may be set, it is a type of problem I so far have never needed to resolve. Even if I could take the entered URL and remove everything before the questions mark leaving me with, example:
    ?do=newthread&f=34
    Any help would be greatly appreciated.


    Dave

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Since you're just moving your forum to a different folder, you don't need to do any fancy 'getting all globals' or even writing any PHP code. You can use Apache's mod_rewrite to redirect all the URLs (maintaining the query strings), or you can use $_SERVER['QUERY_STRING'] to access the entire query string and pass it on, or $_SERVER['REQUEST_URI'] for the filenamd and query string.

  3. #3
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worked a treat. Thank you.


Bookmarks

Posting Permissions

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