for this file, if you put it in the main directory, it will work with all the sub folder or you have to put the file in each folder

[ i am using hotlink prevention ]

It will work in the directory it’s in, and all directories below that. If you want to override it for a certain subdirectory, you can do that by creating another .htaccess file in that directory changing whatever it is you need to change.

If you want useful replies, ask smart questions.