My D8 site uses the usual convention in .htaccess to rewrite non-file requests to index.php:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php [L]
However, if I try to perform a location match in my Apache 2.4 httpd.conf virtualhost, it fails because it seems that REQUEST_URI is set to index.php.
<Location /foo/bar>
#Directives that should fire when accessing /foo/bar but don't
</Location>
<Location /index.php>
#Directives that do fire when accessing /foo/bar
</Location>
Any ideas for getting this to work? I have tried:
<If "%{REQUEST_URI} =~ m#^/foo/bar#">
#Directives that should fire when accessing /foo/bar but don't
</If>
<If "%{REQUEST_URI} =~ m#^/index\.php#">
#Directives that do fire when accessing /foo/bar
</If>