#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I saw a site that used the GET method like this: http://www.bla.com/index.php/id/5
    or something like that ... how is that possible to do that? i know it has a search engine advantage ...

    thanx.
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    use the server variable
    named : $PATH_INFO

    as far as i know it is
    available under IIS in cgi-bin directory
    and everywhere under apache

    ------------------
    Greetings lewi
  4. #3
  5. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    It's quite easy: everything after the file name is part of the query string. You can use explode(), substr() or other ways to generate variables available to your PHP script, but which look to the outside world like real directories.

    In the end, it's not as powerful as mod_rewrite on Apache, but if you need a quick solution, there it is.

    This is not the only method to do this. I think if you search this forum for "search engine", you will find quite a few good solutions. Also look for mod_rewite in the Apache forum.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    But ...
    it thinks index.php is a folder because of the "/" after it ...
    I saw in a site that the "/" was considerd as a "?" in a standard GET request.

    more details please..

    thanx.
  8. #5
  9. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    under apache it will work
    look at my first message, i already experimented with this


    you can do:
    www.yoursite.com/html.php/dir/file.html

    and i also used mod_rewrite as an extra
    with a rewrite rule 'something' like this

    REWRITERULE /<LI> /html.php/$1 [L]

    so u can do : www.yoursite.com/dir/file.html
    which is translated to: www.yoursite.com/html.php/dir/file.html

    in html.php u can use
    $PATH_INFO which is
    in this case: "/dir/file.html"


  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    There is a great section on this stuff in

    "Web Application Development with PHP 4.0" from New Riders Press (written by: Ratschiller/Gerkin)

    If I had more time, I would recap it, but if you can get to a bookstore and read the section on manual URL rewriting... starting on pg 126....

Similar Threads

  1. sending multiple variables to a function
    By myrrdan in forum Visual Basic Programming
    Replies: 2
    Last Post: February 3rd, 2004, 03:07 PM
  2. sending variables using URL ?
    By tim0 in forum Perl Programming
    Replies: 7
    Last Post: December 19th, 2003, 02:14 PM
  3. sending back variables from child window
    By naph in forum HTML Programming
    Replies: 0
    Last Post: October 23rd, 2003, 11:01 AM
  4. fsockopen sending variables
    By GGK in forum PHP Development
    Replies: 0
    Last Post: October 20th, 2003, 01:22 PM
  5. sending and getting variables across pages
    By itatabitovski in forum PHP Development
    Replies: 1
    Last Post: September 25th, 2003, 07:12 AM

IMN logo majestic logo threadwatch logo seochat tools logo