I have three folders (at the same level) in my website, running locally (xampp): NZMotorhome/ NZMotorhomeForum/ NZMotorhomeChat/ In NZMotorhomeChat/index.php I have a link, thus This links correctly and opens the NZMotorhomeForum/index.php file. In NZMotorhome/MainPage.html I have an identical link, When this link is clicked a listing of the NZMotorhomeForum directory is displayed instead of opening the the NZMotorhomeForum/index.php file. Can anyone suggest why this might be happening - or what I can do to try to figure out what is happening? Thanks.
it will show the whole directory if you place this because this link is asking for the directory not the index.php file and if you want assign a link to index.php then you have to mention proper link to that so here is the corrected code you mention above so always try to assign link to exact same that will always solve your problem also if you want to run that page on local host them write code such like this
Thanks for the input.. A couple of points: 1. If the problem is not being able to find the default file, why does it manage to find and open the file (index.php) when linked from NZMotorhomeChat but not from NZMotorhome? 3. If I add "/index.php" to the end of the link (as suggested), I get is a display of text in block format based on the code in index.php. Nothing is rendered. I'm foxed Added later.... OK. If I add the absolute localhost address in the front (rather than the relative ../ address) it works. Also I don't need to add the specific "index.php". I can't understand 2 things: Why will a relative address not work in a localhost environment? Why does the relative link work fine from NZMotorhomeChat (but not from NZMotorhome)?