sam
sam

Reputation: 15

URL tuckey - outbound rule

I'm having trouble with tuckey URL outbound rules. I was able to set up inbound rules, but I need to convert a URL using outbound rule. We are using tuckey with Spring.

Outbound rule:

<outbound-rule>
    <from>^/domain.mvc?domainId=([0-9]+)&amp;domainName=([a-z]+)$</from>
    <to type="forward">/signin.mvc/$1/$2</to>
</outbound-rule>

JSTL:

<a href="<c:url value="/domain.mvc?domainId=0123&amp;domainName=abc" />">

Although it says processing outbound rule it's not forwarding to my URL. In the url-rewritestatus it shows all my rules but doesn't show matched ones. What I am doing wrong?

Upvotes: 0

Views: 1172

Answers (1)

Nicko
Nicko

Reputation: 3343

The question mark ? has a special meaning in a regex. You will need to escape it with a backslash.

^/domain.mvc\?domainId=([0-9]+)&amp;domainName=([a-z]+)$

Upvotes: 1

Related Questions