.htaccess help


#1

Hi,

I’ve got my main domain with a couple of sub domains. My main domain has a folder like “domainroot” and the subdomains has it’s folders under “domainroot” like “domainroot/subdomain1, domainroot/subdomain2 …etc”.
Will I be able to have a single .htaccess with the “Options -Indexes” to turn off directory listing to all folders and subdomains or do I need separate .htaccess files on all folders?

I have the single .htaccess like so:
Options -Indexes
DirectoryIndex blah blah blah
ErrorDocument 404 http://maindomain.com/404.php

both directoryindex and errordocument seems to be working but the options -indexes does not work. Please help and thanks in advance. Plus is there somewhere in the panel I can do this or it must be through .htaccess. Thanks.


#2

it should work for all subdirs unless you have another .htaccess in one of the subdirs which overrides your Options statement