From 7380ad162d59afd02bc3f0c2c89d94d4375e3526 Mon Sep 17 00:00:00 2001
From: Stefan Fritsch .htaccess
files
to change the scope of other configuration directives.
The most commonly used configuration section containers are the
ones that change the configuration of particular places in the
@@ -278,6 +278,20 @@ Deny from all
+
The <If>
+directive change the configuration depending on a condition which can be
+expressed by a boolean expression. For example, the following configuration
+denies access if the HTTP Referer header does not start with
+"http://www.example.com/".
+<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
+Require all denied
+</If>
+
Choosing between filesystem containers and webspace containers is
@@ -322,6 +336,20 @@ rule. Putting configuration restrictions in a <Location
to all requests regardless of the specific URL.
Some section types can be nested inside other section types. One the one
+hand, <File>
can be used
+inside <Directory>
. On
+the other hand, <If>
can
+be used inside <Directory>
,
+<Location>
, and <Files>
sections. The regex
+counterparts of the named section behave identically.
Nested sections are merged after non-nested sections of the same type.
+ + +<Location>
and <LocationMatch>
done simultaneously<If>
+ Apart from <Directory>
, each group is processed in
--
2.40.0