Forum Moderators: coopster
Can someone please explain to me what is happening, why the relative links are broken and how I code these pages to allow them to be displayed properly under either circumstance. The page is using relative paths for the images (in this case "src="../images/#*$!xx").
I'm not sure yet where the calls to page.php/ are coming from, but I obviously want them to display correctly.
Thanks.
Or you can use mod_rewrite to redirect the user to the correct file.
RewriteRule ^page\.php\/$ page.php [R=permanent,L]
There are two problems. I am using a page for search engine listing purposes, which provides a list from a MySQL database, using the 'friendly' address, /page.php/P/375 to that engines who don't like the? will index the entire site. So, I imagine that your mod-rewrite solution, although the neatest, would block these pages (wouldn't it?).
Secondly, the biggest problem with a solution in the web pages is that I'm authoring on a Windows platform and the site is hosted on Linux. I need to find a solution that allows me to see and work on the graphics/illustration on my local machine while editing which I believe isn't possible with the code you suggest. Or am I misunderstanding what I have to do?
Thanks for your input and suggestions though and hopefully you can put me straight.
I did a test page which includes phpinfo() and ran it by calling test.php and test.php/
The Apache Environment table has two extra rows on the info for test.php/ - The first new entry is 'PATH_INFO' which shows '/' and 'PATH_TRANSLATED' which shows the Linux path to the root of the web '/home/vhost/domain.com/html/'
Now, I'm not sure what this proves or means, but it would seem to me that the page 'thinks' its in a different directory when the page is called as test.php/ and so isn't finding the relative paths to the image files. I'm hoping that there's a fix to this, or at least a workaround - such as a piece of php code I can slap into the top of the page so that it corrects the situation.
All help gratefully received. Thanks.