How to allow access to only 1 page?

Is there a website in the local network, smart home and all that. It has API for VC and stuff :) the Website was moved from hosting on my car and now I sit and think :)
You need to allow access to the directory API all, and to the rest of the site to block access to all but the LAN devices...
Understand that you need to write a rule in htaccess but don't know how :(
March 20th 20 at 11:25
1 answer
March 20th 20 at 11:27
In the root directory create a file .htaccess and write:
Order Deny,Allow
Deny from all
Allow from
Allow from
Allow from
Allow from

in the api folder create a file .htaccess
Order Allow, Deny
Allow from all

Find more questions by tags htaccess