.htaccess per directory in nginx

.htaccess

is a workaround (kind of a "duct tape") for shared hosting environments. It has a performance (speed) penalty.

read prooflink from NGiИX developers: https://nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/

http://www.nginxtips.com/why-doesnt-nginx-support-htaccess-files/

So the main rule when you configuring (migrating from apache) is: NEVER USE CONVERTERS!!!

Look at location and try_files directives instead:

https://nginx.org/en/docs/http/ngx_http_core_module.html#location

http://nginxtips.com/nginx-location-directive/

https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files

https://nginx.org/en/docs/http/ngx_http_rewrite_module.html