How to prevent users from seeing my files, only me, using .htaccess?

Viewed 27

I have a .json file, and I'm using ajax to get the data, but I would like no one to be able to see the file, nor use it.

This doesn't work, because why not even i can access with ajax

<Files "*.json">
      Order Deny, Allow
      deny from all
      allow from localhost
</Files>

I wish that no one could see the file or use it, only my website, and anyone who accesses my website can't see it too

0 Answers
Related