0

forgive the trivial question but I don't understand how to use ip addresses properly to deny access to my site. Let's say i have got the web site www.mywebsite.com. Suppose I have the following 3 ip addresses from my office machine:

ipv4: 192.1.2.3
default gateway: 192.1.2.345
and the global ip for my network: 456.34.56.78 (retrieved using www.globalip.com)

Now I would like to grant access to any user in my network hence i would have thought that the right number to use is the global ip 456.34.56.78 common to all machine in my office:

I am using the following code:

# redirect all visitors to alternate site but retain full access for you
ErrorDocument 403 http://www.bbc.com
Order deny,allow
Deny from all
Allow from 456.34.56.78

but it is not working. It is redirecting all machine in my network as well as external ones. What I am doing wrong? Thank you for your help

user1536396
  • 489
  • 2
  • 7
  • 22
  • I believe it should be `Order allow,deny` – Jon Apr 15 '13 at 12:21
  • Thank you for your help, Jon. Unfortunately it did not work – user1536396 Apr 15 '13 at 12:36
  • Check the logs to see what they are showing your IP as? But I do believe it needs to stay as `Order allow,deny`, otherwise it will always be denied, regardless of the allow list. ^^ – Jon Apr 15 '13 at 12:39
  • I just tried this with my own webspace and it works as expected. Possible errors could be a wrong IP address or some typo in your .htaccess. – Olaf Dietsche Apr 15 '13 at 13:52

0 Answers0