3

How do I have a current directory .htaccess ignore Options from upper directory .htaccess?

2 Answers2

5

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
Chris S
  • 77,337
  • 11
  • 120
  • 212
3

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.

user9517
  • 114,104
  • 20
  • 206
  • 289