Tobster Posted April 11, 2006 Share Posted April 11, 2006 Hello,I'm trying to implement the PATH_INFO search friendly technique into my website, and I'm pretty comfortable with how to do it. I just started, and ran into a problem: I go to [a href=\"http://localhost/test/index.php/blah\" target=\"_blank\"]http://localhost/test/index.php/blah[/a] and index.php won't include any CSS files, images, or Javascript files. My browser is saying that "CSS file doesn't exist at [a href=\"http://locahost/test/blah/style.css"\" target=\"_blank\"]http://locahost/test/blah/style.css"[/a], when I'm trying to include it as [a href=\"http://localhost/test/style.css\" target=\"_blank\"]http://localhost/test/style.css[/a].Thanks in advance,- Toby Quote Link to comment Share on other sites More sharing options...
bonaparte Posted April 11, 2006 Share Posted April 11, 2006 [!--quoteo(post=363603:date=Apr 11 2006, 06:06 AM:name=Tobster)--][div class=\'quotetop\']QUOTE(Tobster @ Apr 11 2006, 06:06 AM) [snapback]363603[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hello,I'm trying to implement the PATH_INFO search friendly technique into my website, and I'm pretty comfortable with how to do it. I just started, and ran into a problem: I go to [a href=\"http://localhost/test/index.php/blah\" target=\"_blank\"]http://localhost/test/index.php/blah[/a] and index.php won't include any CSS files, images, or Javascript files. My browser is saying that "CSS file doesn't exist at [a href=\"http://locahost/test/blah/style.css"\" target=\"_blank\"]http://locahost/test/blah/style.css"[/a], when I'm trying to include it as [a href=\"http://localhost/test/style.css\" target=\"_blank\"]http://localhost/test/style.css[/a].Thanks in advance,- Toby[/quote][a href=\"http://localhost/test/index.php/blah\" target=\"_blank\"]http://localhost/test/index.php/blah[/a] - Are you sure index.php is a directory? Perhaps not? Double check the paths. Quote Link to comment Share on other sites More sharing options...
Tobster Posted April 11, 2006 Author Share Posted April 11, 2006 index.php isn't a directory, it's my PHP script. There is one way I can do it; put the full URL when including my CSS/image/Javascript files. But I looked at [a href=\"http://freemind.sourceforge.net/wiki/index.php/Main_Page\" target=\"_blank\"]this website[/a], and if you view their source, they just use a relative path -- how do they do it? Quote Link to comment Share on other sites More sharing options...
bonaparte Posted April 11, 2006 Share Posted April 11, 2006 [!--quoteo(post=363612:date=Apr 11 2006, 06:47 AM:name=Tobster)--][div class=\'quotetop\']QUOTE(Tobster @ Apr 11 2006, 06:47 AM) [snapback]363612[/snapback][/div][div class=\'quotemain\'][!--quotec--]index.php isn't a directory, it's my PHP script. There is one way I can do it; put the full URL when including my CSS/image/Javascript files. But I looked at [a href=\"http://freemind.sourceforge.net/wiki/index.php/Main_Page\" target=\"_blank\"]this website[/a], and if you view their source, they just use a relative path -- how do they do it?[/quote]I could ping point the problem if you could be more clearn. Pelase put in the actual paths to make the point clear.In your first post you say you are including other files in [a href=\"http://localhost/test/index.php/blah\" target=\"_blank\"]http://localhost/test/index.php/blah[/a]. This will not work because index.php is not a directory. There cannot be a subdirectory under test/index.phpYou also mention that the browser says that the file [a href=\"http://locahost/test/blah/style.css\" target=\"_blank\"]http://locahost/test/blah/style.css[/a] doesn't exist when you're trying to include it as [a href=\"http://localhost/test/style.css\" target=\"_blank\"]http://localhost/test/style.css[/a]. What the browser is expecting is obviously not there. Note the change in the path - blah/style.css and test/style.css Quote Link to comment Share on other sites More sharing options...
Tobster Posted April 11, 2006 Author Share Posted April 11, 2006 Don't worry, I found a way to fix it -- the <base> tag. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.