Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior of wildcards ** #39

Closed
GoogleCodeExporter opened this issue Apr 14, 2015 · 4 comments
Closed

Strange behavior of wildcards ** #39

GoogleCodeExporter opened this issue Apr 14, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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.

Original issue reported on code.google.com by e.cervat...@gtempaccount.com on 29 Jun 2009 at 2:38

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The rule modified as in the following does the trick. No need to use the 
match-type
wildcard in the end. But it is necessary to use the {query-string} construct.

  <rule>
      <from>/nl/(.*)</from>
      <to type="permanent-redirect">/$1?%{query-string}</to>
  </rule> 

Original comment by e.cervat...@gtempaccount.com on 8 Jul 2009 at 2:45

@GoogleCodeExporter
Copy link
Author

Invalid - should be closed. Please post all such stuff on the mailing list.

Original comment by avl...@gmail.com on 10 Aug 2009 at 6:42

@GoogleCodeExporter
Copy link
Author

Original comment by tuc...@gmail.com on 10 Aug 2009 at 9:03

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant