I am using the LocationMatch
directive to set headers upon matching of certain URL patterns:
# 1
# Expected matches: //mysite.com/any-page-with-at-least-a-character-and-no-dot
<LocationMatch "^/[^\.]+$">
Header set X-Intelligence "STUPID"
</LocationMatch>
# 2
# Expected matches: //mysite.com/ , //mysite.com/main , //mysite.com/about
<LocationMatch "^/(|main|about)$">
Header set X-Intelligence "CLEVER"
</LocationMatch>
However, the URL //mysite.com/ matches #1 instead of #2. Is this a bug or am I doing something wrong?
I even tried using the regex "^/(main|about)?$"
in #2, but still no love.