Issue 39 in urlrewritefilter: Strange behavior of wildcards **

5 views
Skip to first unread message

codesite...@google.com

unread,
Jun 29, 2009, 10:39:00 AM6/29/09
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 39 by e.cerv...@sourcesense.com: Strange behavior of wildcards **
http://code.google.com/p/urlrewritefilter/issues/detail?id=39

I am using the tuckey urlrewriter 3.1.0 and I set up the following rule.

<rule match-type="wildcard">
<from>/nl/**</from>
<to type="permanent-redirect">/$1</to>
</rule>

I would simply like to strip away the 'nl' part of my url and leave the
rest, but if slashes are present, with $1 only the first piece is
retrieved. As a result if I consider the http request coming in
nl/blabla1/blabla2?param=3 this will be translated in blabla1

Is this the expected behavior? What shall I do in order to retrieve the
part of the url following the nl/ ?

Thank you very much.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Avlesh Singh

unread,
Jun 29, 2009, 11:34:32 AM6/29/09
to urlre...@googlegroups.com
Is this an "issue"?
You should have asked this question first on the mailing list. Filing a bug comes in much later.

Read up on how the wildcard matching engine works here.

A simple solution (with the default "regex" match type) to your problem could be these two rules underneath:

<!-- this is match all your url's with a queryString -->
<rule>
    <from>^/nl/(.*)\?(.*)$</from> 
    <to>/$1?$1&amp;$2</to>
</rule>

<rule>
    <from>^/nl/(.*)$</from>
    <to>/$1</to>
</rule>

A similar solution was posted recently here - http://www.nabble.com/revised-question-td24209680.html

Cheers
Avlesh
Reply all
Reply to author
Forward
0 new messages