Apache - Permissions with Directory, provide access only by root (/)

0

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>
    
asked by anonymous 22.08.2018 / 04:23

0 answers