Hi George,
On Tue, May 22, 2012 at 2:00 PM, George A <
morphe...@gmail.com> wrote:
> Hey there,
> I'm sorry if the question has already been ansewerd but i couldn't
> find an answer as there are so many posts.
>
> My problem is that i have a url like:
> localhost:7001/page.jsp?key=home and i want to have the form:
> localhost:7001/home
The query string is not included in the match by default, so this
won't work. You can use "use-query-string=true" on the top level
element to include it. Usually however, it's better to use a
<condition>, you can use backreferences to what was matched in the
conditions (with %1, %2, ...).
> <outbound-rule>
> <from>^paget.jsp?key=([a-z]+)$</from>
> <to>$1</to>
> </outbound-rule>
You have a misspelling here, not sure if that's the problem. Try
enabling debug logging, I bet the URL you're rewriting is not what you
think it is (in particular, it probably already contains a '/'). It's
good to use anchors here and there, but it means you have to be very
sure you are matching what you think.
regards,
Wim