Name
allow
Synopsis
allow
from
hostname
hostname
...
[Within <Directory> or
.htaccess]
The allow directive
specifies which hosts can access a given directory in the site. The
hostname can be any of the following:
- Domain name
A domain name, like .oreilly.com. Only hosts from the domain are permitted access.
- Hostname
A full hostname.
- Full IP address
An IP address of a host.
- Partial IP address
The first 1 to 3 bytes of an IP address, for subnet restriction.
- Network address/netmask
A full network address, followed by a full netmask. (i.e., 192.168.220.110/255.255.255.0)
- Network address/CIDR specification
A full network address, followed by an abbreviated netmask. (i.e., 192.168.220.110/24 is equivalent to 192.168.220.110/255.255.255.0)
-
all Using this option means that all hosts are allowed.
There can be only one allow directive per section.
If omitted, there is no default.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access