Only allow specific IPs to view folder and/or files
You’ll need a web.config file in the root of your domain. If you don’t have one, then you can create one through our File Manager or an ftp-program like FileZilla.
If you have a blank web.config file
Add the following code to web.config:
If you already have some code in your web.config file
Add the following code within "configuration" in web.config:
How to set folder or file for restriction
Change the "path" in the code to either a folder or file, where you want to set the restricted access.
It's set to the folder "restricted" in the examples above.
How to set allowed IP
Change the IP ”10.10.10.10” to the IP that you want to allow.
You can add more IP-addresses by simply adding more ”add”-lines. Example:
If you would like Surftown to preform this task for you, or if you are in need of any other assistance, please have a look at the paid services we kan offer through our Service Desk Services: https://www.surftown.com/da/service-desk/