I have a section that uses a file (we'll call it index.php) that gets content from a database based on the PATH_INFO. Here is some example code, it might not be perfect but I have a working copy.
<?php
$query = getenv("PATH_INFO");
$qArr = explode("/", substr($query,1);
queryDB($qArr);
?>
...and so on. queryDB would use the array to query the database and display the content. That all works fine.
What do not work fine are links. All the links on the pages in my database are along the lines of <a href="page.html">page</a>.
So here's an example of my problem. The user is visiting mysite.com/index.php/section/page
There is a link to "page2" on that page, but when the user clicks it they are directed to mysite.com/page2, because index.php/section is not actually a directory. You're probably thinking, well that's easy, use <base href="index.php/section"> and that's exactly what I tried, but it has no effect at all whatsoever. I need index.php/section to function just like a directory, at least to the visiting browser. I think there is a way to do this with <link rel=""> or a header() type thing, but I am not sure how it can be done. Any help is appreciated.