Cascading Behavior
Written
Author
The htaccess file is stored in the main site directory and/or in any subdirectory. The commands in this file will affect both the directory it is in and any of its own subdirectories. So, if you have one in your main directory, it will affect your whole site. If you place one in a subdirectory it will affect all the contents of that subdirectory (including any of its own subdirectories).
If you've worked with CSS coding, this effect may sound familiar. Each file in a directory will be affected by the "closest" or most direct htaccess file available.