I stole this from the wiki, but it works for me:
val profile_rewriter: LiftRules.RewritePf = {
case RewriteRequest(path @ ParsePath("members" :: "profile" :: page ::
_, _, _,_), _, _) =>
RewriteResponse(
ParsePath("profiles" :: "index" :: Nil, "", true, false),
Map("member" -> page :: path.wholePath.drop(2)
.zipWithIndex.map(p => ("param"+(p._2 + 1)) -> p._1) :_*)
)
}
LiftRules.addRewriteBefore(profile_rewriter)
Chas.
Tim Perrett wrote:
> Quick question chaps,
>
> If I want my URLs to look like:
>
> /article/my-demo-blog-post
>
> How would one go about that? Even with something messy like:
>
> "name" -> SHtml.link("/article/" + article.permanent_link.toString, ()
> => Nil, Text(article.name))
>
> I get the query string appended to the url with a bunch of encoding
> stuff... e.g.
>
> http://127.0.0.1:8080/article/demo-post?F1224871776479962000_JWS=_
>
> Whilst, if worse came to worse I could live with this, it would be
> nice not to have it for such a simple operation?
>
> Cheers
>
> Tim
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---