Jump to content

PATH_INFO Problem


Tobster

Recommended Posts

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
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

[!--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.php

You 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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.