SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question inherited urls in includes?

    hello

    using an include like so...

    include("test/test.php");

    the page test.php seems to inherit the base url from the include right? so any image in the file test.php which is lined as test.gif (ie its in the same folder as the file test.php) will in fact display a broken image.

    is there a way around this? absolute urls not really being a solution!

    a+
    gar

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    United States
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to be able to use the include in any directory level in your site you'll need to make the images in the includes absolute.

  3. #3
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not true, silly me i can write an exclusion rewrite rule in apache to handle this, that will work in every directory!

    a+
    gar

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    United States
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Garrett
    not true, silly me i can write an exclusion rewrite rule in apache to handle this, that will work in every directory!

    a+
    gar
    If you have access of course.

  5. #5
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access of course.
    .htaccess that is!!!

    a+
    gar

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    United States
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We almost have a riddle going.


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
  •