AS7-1414
Brian Stansberry
brian.stansberry at redhat.com
Tue Oct 4 15:38:47 UTC 2011
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?
If it is, insertion of a new rule in the middle is really nasty, as it
requires renaming all the existing resources.
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.
>
> Should we go for more operations like:
> :modify-rewrite(index=0,pattern=x,substitutiuon=y,flags=z)
> or
> :modify-rewrite-condition(rewrite=0,condition=0,test=x,pattern=y,flags=z)
>
> Comments?
>
> Cheers
>
> Jean-Frederic
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
More information about the rhq-devel
mailing list