Cool, thank you very much!

On Sep 8, 8:56 pm, Xavi Ramirez <xavi....@gmail.com> wrote:
> That's because the url "post/show" is being intercepted by the same
> rewrite rule that matches "post/<id>" urls.  To get around this, try
> adding an if statement to your rewrite rule:
>
> LiftRules.rewrite.append {
>   case RewriteRequest(ParsePath(List("post", id), _, _, _), _, _)
>      if (id != "show") =>
>         RewriteResponse(List("post","show"), Map("id"->urlDecode(id)))
>
> Hope this helps!
>
> ~Xavi
>
> On Tue, Sep 8, 2009 at 12:12 AM, night_stalker<usur...@gmail.com> wrote:
>
> > I want to make RESTful urls (not REST API), for example:
>
> >  "/post/123" is mapped to "post/show.html" with param "id=123"
>
> > but the following rewrite rule seems recursive
>
> >    LiftRules.rewrite.append {
> >      case RewriteRequest(ParsePath(List("post", id), _, _, _), _, _)
> > =>
> >        RewriteResponse(List("post","show"), Map("id"->urlDecode(id)))
> >    }
>
> > and loops forever ...

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to