Results 1 to 3 of 3

Thread: Getting URL Segment

  1. #1
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default Getting URL Segment

    Hi All,

    I'm not sure how to explain this; I want to be able to grab the value of the URL after a php file.

    For example, if I wanted to show my About page, and the URL was example.com/index.php/about, how would I find the "about" part after index.php?

    Thanks,
    Alex
    Last edited by X96 Web Design; 08-09-2010 at 05:42 AM. Reason: Solved!
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    (i have to put some lowercase writing or the forum lower-cases my script!)

    $_SERVER["PATH_INFO"]

  3. #3
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Thank you! Works perfectly.

    - Alex
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

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
  •