0

What I'm looking for is something along the lines below but instead of restricting access to the whole domain I want to restrict only a specific page and allow certain IP's to access it. Is this possible? Everywhere I searched is only for restricting the whole site. Thank you.

ErrorDocument 403 http://www.domainname.com
Order deny,allow
Deny from all
Allow from 124.34.48.165
Allow from 102.54.68.123
mr.data1
  • 721
  • 3
  • 10
  • 24
  • 1
    http://stackoverflow.com/a/3604605/2060505 – kufudo Feb 17 '13 at 04:42
  • If it is only one page you want to protect, put one .htaccess file in that directory with the access directives and the `ErrorDocument` directive in another .htaccess file in root directory. You don't mention what's the problem, though. – Felipe Alameda A Feb 17 '13 at 07:12

1 Answers1

0

You can use a code like this

<Location /example-map>
  Order deny,allow
  deny from all
  allow from 123.12.12.12
  allow from 123.123.43.43
</Location>

This by the 123... the ip from the allowed ip's and /example-map the location

by RedDev

rowan-vr
  • 136
  • 11