Welcome Guest, Not a member yet? Register   Sign In
Delete all the index.html file "Directory access is forbidden." when using .htaccess
#8

(This post was last modified: 12-01-2018, 03:59 PM by Balenus.)

(12-01-2018, 03:03 PM)dave friend Wrote: Well, first of all, "Deny from all" is deprecated in Apache v > 2.4 syntax and it should be "Require all denied".

In the .htaccess I'm using:

Code:
<IfModule authz_core_module>
    Require all denied
</IfModule>
<IfModule !authz_core_module>
    Deny from all
</IfModule>

(12-01-2018, 03:03 PM)dave friend Wrote: Second, and most important. the "public" folder of a website must be set to "Allow from all" or "Require all granted" or requests for files in that folder (and subfolders) will be denied meaning webpages won't show.

The files are not in a public folder, I'm protecting "application" and "CodeIgniter-3.1.9" inside a private folder that is protected by the .htaccess as suggested by the guide:

For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible via a browser - https://www.codeigniter.com/user_guide/i...index.html
Reply


Messages In This Thread
RE: Delete all the index.html file "Directory access is forbidden." when using .htaccess - by Balenus - 12-01-2018, 03:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB