AS7-1414

jean-frederic clere jfclere at gmail.com
Tue Oct 4 15:52:29 UTC 2011


On 10/04/2011 05:38 PM, Brian Stansberry wrote:
> On 10/4/11 10:27 AM, jean-frederic clere wrote:
>> Hi,
>>
>>
>> There are several ways to process:
>> +++ <rewrite pattern="^/helloworld(.*)"
>> substitution="/helloworld/test.jsp" flags="L" />
>> <rewrite pattern="^/hellomonde(.*)" substitution="/hellomonde/test.jsp"
>> flags="L">
>> <condition test="%{HTTPS}" pattern="off" flags="NC"/>
>> <condition test="%{USER}" pattern="toto" flags="NC"/>
>> </rewrite>
>> +++
>>
>> Creating resources rewrite=rule0, rewrite=rule1 and subresources (for
>> rewrite=rule1) condition=condition0, condition=condition1.
>>
>> the attribute can be changed by things like:
>> +++
>> ./rewrite=rule1:condition=condition1:write-attribute(name=test,
>> value=%{HTTPS})
>> +++
>>
>> but remove like
>> ./ewrite=rule1:condition=condition0:remove
>>
>> brings weird situation where it starts to be hard to see what is managed.
>
> Is the ordering important?

Yes. You can tell the rule is the last one.

>
> If it is, insertion of a new rule in the middle is really nasty, as it
> requires renaming all the existing resources.

it brings add-before or add-after :-(

>
> If it's not important, then people can at least avoid that pain by
> adding new rules at the end. It still leads to a weird situation where
> you can have /rewrite=rule2 and /rewrite=rule4 but not /rewrite=rule3
>
> The user can also do /rewrite=IdontliketheruleXpattern:add(...) and the
> handler would have to check for that and reject it.

Not sure add a rule00 for example could mean it is the rule before rule0 
add a rule01 it is the rule after rule0, it is ONLY configuration so we 
can reorder the rules while writing the xml file.

Cheers

Jean-Frederic


More information about the rhq-devel mailing list