Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expression for redirect using URLRewriteFillter

Status
Not open for further replies.

Kydd

IS-IT--Management
Feb 1, 2006
11
US
Using a program called URLRewrite on our Tomcat server I'm trying to create the following redirect:
From: to: I've created this rule:
<rule>
<from>/product2\.jsp?path=-1|1751&amp;id=1404</from>
<to type="redirect">/ProductDisplay?id=4046</to>
</rule>

Look at the resules of the log below. Apparently, the pipe symbol (|) is being concatenated and parsed into the redirect. I've tried to escape the pipe in the "from" rule above but that doesn't work. Any suggestions?

2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.RuleBase DEBUG: Rule 1 run called with /product2.jsp?path=-1|1751&id=1404
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.RuleBase DEBUG: matched "from"
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.Rule DEBUG: needs to be redirected to /product2.jsp?path=-1|/ProductDisplay?id=4046
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: rule is last
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: processing request for /product2.jsp
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: after utf-8 decoding /product2.jsp
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: context stripped
2006-03-21 16:02:45 StandardContext[]org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: url /product2.jsp?path=-1|/ProductDisplay?id=4046
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top