Agar tera server NGINX hai (Apache nahi), to .htaccess kaam nahi karta.
Ye block apne nginx server config me daal (location blocks):

  location ~* /(config|lib)\.php$ { deny all; return 404; }
  location ~* \.(json|log|txt|md|bak|sql|ini)$ { deny all; return 404; }
  location /data/ { deny all; return 404; }
  autoindex off;

Apache (cPanel) pe kuch nahi karna — .htaccess apne aap chalta hai.
