How do I have a current directory .htaccess
ignore Options
from upper directory .htaccess
?
2 Answers
Simply specify what you want at the current level (and subseqently). If you want it all disabled just:
Options None
Or if you want to disable particular features for example:
Options -Index -ExecCGI
Or if you want to enable additional directive:
Options +Includes
If you want just one feature turned on, it's really nice and readable if you are explicit about it:
Options None +FollowSymLinks
- 77,337
- 11
- 120
- 212
-
1I just double checked on Apache httpd 2.2.24, works exactly as I described. – Chris S Mar 22 '13 at 12:55
-
@JMoore Are you sure? Have you tried it? What problems are you experiencing? – Dan Mar 22 '13 at 13:01
The .htaccess documentation covers this very well, all you have to do is specify them and the later ones will override the earlier ones
The configuration directives found in a .htaccess file are applied to the directory in which the .htaccess file is found, and to all subdirectories thereof. However, it is important to also remember that there may have been .htaccess files in directories higher up. Directives are applied in the order that they are found. Therefore, a .htaccess file in a particular directory may override directives found in .htaccess files found higher up in the directory tree. And those, in turn, may have overridden directives found yet higher up, or in the main server configuration file itself.
- 114,104
- 20
- 206
- 289