It's a bug. Please open a ticket for it. I'll get it fixed tonight. On Wed, Oct 28, 2009 at 11:03 AM, harryh <har...@gmail.com> wrote:
> > First, I rewrite URLs like /user/harryh to /user?uid=harryh > Also, requests to http://m.harryh.org/foo/bar get rewritten to / > subdomain/mobile/foo/bar > > Doing this with the following code: > > val urlRewriter: LiftRules.RewritePF = NamedPF("URLRewrite") { > case RewriteRequest(ParsePath("user" :: uid :: Nil, _, true, _), _, > _) => { > RewriteResponse(ParsePath("user" :: Nil, "", true, false), Map > ("uid" -> uid)) > } > > case RewriteRequest(path, _, req) if > (req.serverName.toLowerCase.startsWith("m.")) => { > RewriteResponse(ParsePath("subdomain" :: "mobile" :: > path.partPath, path.suffix, path.absolute, path.endSlash), emptyMap, > true) > } > } > > LiftRules.rewrite.append(urlRewriter) > > The problem is that emtyMap in the second RewriteResponse. The > uid=harryh parameter that gets created by the first rewrite rule is > being destroyed at which point bad things happen. > > Is there a better way to do what I am trying to do here? > > -harryh > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---