I don't want to let visitors list my directories. When visitors try to list directory, they should land on custom site, that says, that "directory listing is not allowed and blah-blah", or if this is absolutely impossible, then I want them to land on my custom 404.
With "Options –Indexes" in .htaccess, when someone tries to list directory, they see
http://error404.000webhost.com/, instead of my custom error page(when mistyping address, custom 404 works). And I totally do not want visitors to see that page.
With "IndexIgnore *" visitors see simply "Index of ...", and I dont want them to see that either.
I found somewhere that:
"Options +Indexes
IndexOptions +SuppressHTMLPreamble
IndexIgnore *
HeaderName /includes/header.html
ReadmeName /includes/readme.html"
where my custom content would be in header.html
BUT for some reason header wasnt working, and i stil got simply "Index of ..."
Are headers disabled? Or what am I doing wrong?
So, could anyone point me directions how to make it work?