I created an .htaccess file with only the following line:
Options -Indexes
However, the index is still shown for the directory.<
I solved this problem on RHEL by editing file /etc/http/conf/httpd.conf I changed all
/etc/http/conf/httpd.conf
AllowOverride None
To
AllowOverride All
Also you can check httpd.conf AllowOverride by following command on RHEL
grep -i AllowOverride /etc/conf/conf/httpd.conf