How do I restrict access to a Specific Folder/Page on a Website ?

Hello All.

I wanted to know if there is way I can restrict access to all files in a particular sub folder of a website.

For example - I have a site www.xyz.com

I would like to restrict access to any files under www.xyz.com/docs/ . In this case I want to provide access only if it matches the IP 192.169.1.110

Im using PHP7 along with IIS. I do not have apache installed.

Any direction on this is greatly appreciated.

thanks
phpnewb

192… looks like a router address, go to http://whatismyipaddress.com to make sure you have your correct IP address.
then in the folder that you want to restrict people from create a file called .htaccess then inside .htaccess add this:
order deny, allow
deny from all
allow from 192.169.1.110

Sponsor our Newsletter | Privacy Policy | Terms of Service