I can't comment yet... replying to @sgerrand
I solved the issue creating two different rewrite rules. One for static and another for the rest of the content. Please keep in mind that my configuration is for two Splunk search heads with different contexts.
< VirtualHost blablabla:443>
....
....
All the stuff related to servername, directory, documentroot and SSL configuration
....
....
AllowEncodedSlashes On
SSLProxyEngine On
RequestHeader set Front-End-Https "On"
Disable certificate checks on SSLProxy because using self-signed certs on Splunk search heads
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
rewrite rule to forward the request for each of the search heads
ProxyPassReverse /one https://10.0.1.1:8000/one
ProxyPassReverse /two https://10.0.1.2:8000/two
RewriteEngine on
rewrite rule for the context nonstatic
RewriteRule /one(.*) balancer://splunkbalancer_one$1 [P]
RewriteRule /two(.*) balancer://splunkbalancer_two$1 [P]
rewrite for static requests
RewriteRule ^/(.+) balancer://splunkbalancer/$1 [P]
setting for sticky session on the balancers
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
Balacer for static requests
<Proxy balancer://splunkbalancer>
BalancerMember https://10.0.1.1:8000/one route=1
BalancerMember https://10.0.3.2:8000/two route=2
ProxySet stickysession=ROUTEID
</Proxy>
Balacer for nonstatic for each Splunk context this is to prepare for the future and have more than one search head in each context
<Proxy balancer://splunkbalancer_one>
BalancerMember https://10.0.1.1:8000/one route=1
ProxySet stickysession=ROUTEID
</Proxy>
<Proxy balancer://splunkbalancer_two>
BalancerMember https://10.0.1.2:8000/two route=2
ProxySet stickysession=ROUTEID
</Proxy>
</VirtualHost>