Named parameters as backreferences

Topics: Developer Forum
Oct 25, 2013 at 2:20 PM
Edited Oct 25, 2013 at 2:28 PM
I'm creating a tool that will configure ini file for IIRF module. The file will look like this:
... some rewrite rules...

RewriteCond ... some condition ...  [I]
ProxyPass ^/(.*)$          http://internal-server/$1

... more rewrite rules...
I want to be able to configure this file to set a specific host for ProxyPass, but I don't want to parse eache rule and figure out which rule is mine, because there could be other rules and it would be much easier for me if there was a possibility to create a named parameter like this:
Parameter %{LoadBalancerHost} internal-server
RewriteCond ... some condition ...  [I]
ProxyPass ^/(.*)$          http://%{LoadBalancerHost}/$1
Then I can easily find it by name and replace it with my value. With such approach there will be no problems modifying this file, anybody can change the rules the way they want and not break anything and my tool will also not rewrite any rules.

Is there anything similar to such parameters?
Oct 28, 2013 at 7:04 PM
Sorry, I haven't seen RewriteMap in version 2.1 and was using version 2.0. It solves my problem completely.