
Is there any known approach for using variable patterns?
The simpliest I can guess is
RewriteRule .* - [E=ENV:VAR1:(optA|optB|optC)]
RewriteRule ^(%{ENV:VAR1})$ /path%{ENV:VAR1}/ [R,L]
unfortunately is not acceptable

and neither is the workaround like
RewriteRule .* - [E=ENV:VAR1:(optA|optB|optC)]
RewriteCond %{ENV:VAR1} ^(.*)$
RewriteRule ^(%1)$ /path%{ENV:VAR1}/ [R,L]
both in red are interpreted literally, no substitution

Any idea'll be appreciated.
thank you