I'm trying to set permissions on the apache settings. What I want to do is to let root, "/", but not any url that has any character after the slash. For example:
localhost or localhost / can be accessed. localhost / index.php, localhost / subdirectory / or localhost / something should not be accessed.
Is there a way to do this, even if index.php is set to DirectoryIndex? In this case, I did not want the index.php to be accessed directly through the URL, just by the "/".
I tried this setting, but I did not succeed.
<Directory "/*">
Deny from all
</Directory>
<DirectoryMatch "^/$">
Allow from all
</DirectoryMatch>