Urgent: How do I disallow a php/html file to act as a folder?
| From: | Daniel Anderson | Date: | Sun, 05 Dec 2004 20:24:18 +0000 |
| Subject: | Urgent: How do I disallow a php/html file to act as a folder? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25119@lists.php.net to get a copy of this message | ||
I recently noticed that for some reason, if I type the filename as a folder ("http://localhost/folder/") it runs the nearest file
called that.
I have several .php on a server, which can run without the extention. ("http://localhost/folder/file"), but if I typed
("http://localhost/folder/file/")
it'll still run that file. And to save time, I have made a header and footer for each of the
pages I make, so it does not consume more time re-adding them everytime I create a new document.
Is there a way that I can disable this?
So that a file (php, html, jsp, etc.) can't be launched as a folder, but can still be launched
without the file extension?
So:
http://localhost/folder/file works,
http://localhost/folder/file.php works
but:
http://localhost/folder/file/ doesn't unless there
is a folder called "file".
I don't know if this is a PHP problem, or an Apache problem.
Thanks,
Dan