1

Server: Apache 2.2.17

I have the next .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule !^includes/ - [S=1]
RewriteRule ^includes/[^/]+\.php$ - [F,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

As you can see, I'm forbidding users to access all php files that are inside the "includes" directory. Besides php files, I also have another directory and an image inside "includes", but I don't have an index file. So why forbidding all php files this way denies access to the directory listing?

PHP files are forbidden, and I can access the image and get inside the other directory inside "includes". But the listing of files in the "includes" directory is denied. Why?

0

You must log in to answer this question.