| How to allow by IP only? [message #282] |
Mon, 20 March 2006 01:29  |
Sentinel Messages: 4 Registered: March 2006 |
|
|
|
I searched before asking but I did not find an answer to this question.
I see where you have a way to block by IP address.
But how do I allow by IP address only? In other words I want to allow access to a certain folder on my web site only to me at from my IP address and block any one else.
|
|
|
|
| How to allow by IP only? [message #290] |
Thu, 23 March 2006 17:09   |
Sentinel Messages: 4 Registered: March 2006 |
|
|
|
OK a few more questions just to make sure I have got it if you don't mind.
Another person told me to do this:
Order Deny,Allow
Deny from all
Allow from xx.xx.xx.xx
But according to your post you leave out the "deny from all" and your order is allow,deny not deny,allow. From the information on the link you posted it would seem that it can be done either way because ...
In the example I show above the default is to allow since that is listed last, BUT since I put the "deny from all" statement it would deny from all but allow that one specific IP address.
In your example the default is to DENY since it is listed last, so it would allow the one specific IP address but deny everyone else since the default is to deny. Therefore there is no need for the "deny from all" statement. Do I understand so far?
So you can have ...
order deny,allow
deny from all
allow from x.x.x.x Or you can have ...
order allow,deny
allow from x.x.x.x
But is it OK to have ...
order allow,deny
deny from all
allow from x.x.x.x Would that be wrong?
|
|
|
|
| How to allow by IP only? [message #294] |
Sat, 25 March 2006 19:22   |
Sentinel Messages: 4 Registered: March 2006 |
|
|
|
| andreas | Yes, you got it correct.
order allow,deny
deny from all
allow from x.x.x.x
The above code is also ok to use.
|
But the above code does not work. It denies everyone including me.
|
|
|
| How to allow by IP only? [message #295] |
Sat, 25 March 2006 20:59  |
andreas Messages: 239 Registered: January 2005 Location: Denmark |
Site Admin
|
|
|
Try
order allow,deny
allow from x.x.x.x
deny from all
|
|
|