I am having difficulty figuring out how to use environment variables in ProxyPassMatch
.
My general format:
<LocationMatch "(?<THING>Regex)">
ProxyPassMatch http://example.com:8000/%{env:MATCH_THING}
ProxyPassReverse /
</LocationMatch>
I have %{MATCH_THING}e
logged and the log shows that the regex-captured URL is capturing what I want it to capture, but every time I try to access the LocationMatched
URL through the proxy, I get 404 Not Found.
It works when I directly try http://example.com:8000/RegexCapturedURL
.
Where RegexCapturedURL
= %{MATCH_THING}e;
Here are some of the ProxyPassMatch
lines I have tried so far:
ProxyPassMatch http://example.com:8000/%{env:MATCH_THING}
ProxyPassMatch http://example.com:8000/%{MATCH_THING}
ProxyPassMatch http://example.com:8000/%{THING}
ProxyPassMatch http://example.com:8000/%{MATCH_THING}e
What am I doing wrong or not understanding correctly?