This may sound like a strange question.
I’ve some directories: inside every directory there’s an index.php file, so when you access http://mywebsite.com/mydirectory the index.php of that directory is requested.
For some reason I need a different thing: the name of the file must be the same of the directory, so, for example, if I have the docs directory, the file requested must be the one named docs.php.
Is this possible? How?
Read more here: Call PHP with the same name of the directory the file is in