Results 1 to 4 of 4
  1. #1

    How to replace question marks with forward slashes in URL's

    Hi,

    I have a PHP script that places question marks in the URL, and I'm trying to get it to replace them with forward slashes. Does anyone know of a resource that can help with this?

    I'm pretty sure it comes down to a Apache mod, but unfortionately this isn't my area of expertise.

    Thanks any help.

    Zak

  2. #2
    Join Date
    May 2001
    Location
    Dayton, Ohio
    Posts
    4,977
    PHP Code:
    <?php
    $url
    =explode("/",$REQUEST_URI);
    //The above gets the URI string aka /test.php/asd/skjle
    //and explodes it into an array...



    $id=$url[0];
    //That signifies the first thing in the URI array, aka test.php
    $id=$url[1];
    //This signafies the second thing in the URI array aka asd
    $id=$url[2];
    //This signafies the third thing in the URI array aka skjle

    ?>
    Just that easy

  3. #3
    Wow- I sure appreciate you taking the time in doing that for me.

    Would I simply place this in each php file?

    Sorry- I know absolutely nothing about PHP.

    Thanks again-- very kind of you.

    Zak

  4. #4
    If you go to http://www.ratemyhost.com/view_ratings.php and mouse over "View" on the right side, you'll see what I'm trying to get rid of.

    A typical URL for these would be
    http://www.ratemyhost.com/view_rating.php?id=12

Posting Permissions

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