1

I have a folder full of folders with json files. I want to restrict AJAX requests to these files to certain domains.

I made an htaccess file to restrict this but it isn't work. My htaccess is as follows:

<FilesMatch "\.json$">
    <RequireAny>
        Require host thedomain.com
        Require host thehurts.com
    </RequireAny>
</FilesMatch>

This is blocking everyone, including myself.

I read that Require local gives myself access but that didn't work when I added it.

if I add Require all granted I have access and can AJAX to the files from other domains but that also gives access to everyone on the internet, which is what I don't want.

Any ideas?

abetwothree
  • 111
  • 2

0 Answers0