Name
<Location> and <LocationMatch>
Synopsis
<Location URL
>
...
</Location>
The <Location>
directive limits the application of the
directives within the block to those URLs specified, which can
include wildcards and regular expressions preceded by
~
. In line with regular-expression processing in
Apache v1.3, *
and ?
no longer
match to /
.
<LocationMatch>
is followed by a regular
expression without the ~
.
Most things that are allowed in a
<Directory>
block are allowed in
<Location>
, but although
AllowOverride
will not cause an error in a
<Location>
block, it makes no sense there.
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.