<IfModule mod_version.c>
    <IfVersion < 2.4>
        Order allow,deny
        Deny from all
        <FilesMatch "^(index\.php|)$">
            Allow from all
        </FilesMatch>
    </IfVersion>
    <IfVersion >= 2.4>
        Require all denied
        <FilesMatch "^(index\.php|)$">
            Require all granted
        </FilesMatch>
    </IfVersion>
</IfModule>

<IfModule !mod_version.c>
    # Apache 2.2
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
        <FilesMatch "^(index\.php|)$">
            Allow from all
        </FilesMatch>
    </IfModule>

    # Apache 2.4
    <IfModule mod_authz_core.c>
        Require all denied
        <FilesMatch "^(index\.php|)$">
            Require all granted
        </FilesMatch>
    </IfModule>
</IfModule>
