SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there.

    I have just implemented the "easy" URL thingy on 2 sites.

    eg

    release.php/45

    by using the following code :

    Code:
    if (!isset($ID))  {
    
    $url_array = explode("/",$PATH_INFO); 
    
    $ID=$url_array[1]; 
    
    }
    This works fine apart from the fact that for some reason I am now unable to use relative paths ; for example an image linked thus :

    <img src=../images/pic.gif>

    does not work. What is wrong - it worked fine before, now relative links appear broken. This is messing up the hundreds of pages of content I am running so any help with this problem is appreciated.

    Thanks,
    James

  2. #2
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any1?

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you use the script for? I mean that your assumption in the script was that ID alsway the second argument and that's it, nothing else.
    So when it comes to different path (relative) the script might get the wrong info and therefore, doesn't do the right thing. Print out the value of $ID to see if you're getting expected values.

    Hope this helps.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ID is always the 2nd argument : the serving and retrieval of the info from the DB works fine :

    http://www.hiphopmusic.co.uk/reviews/single.php/54

    However - any "../" links (eg all of the audio) gets mucked up.

    thanks
    j

  5. #5
    psycho
    Join Date
    May 2000
    Location
    London
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can anyone please help me out with this ?

    compare the links on

    http://www.hiphopmusic.co.uk/reviews/single.php/54

    to

    http://www.hiphopmusic.co.uk/reviews/single.php?ID=54

    Thanks again


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
  •