Bob Folkerts <rob...@folkertsfotografie.com> writes: > I am switching my wife's hosted photography site to Liftweb, largely > as a reason to learn Lift. Part of the conversion is moving the old > directory structure to a cleaner structure. I wanted to redirect all > of the old URI's to the modern equivalent. I read Chapter 13 of the > Lift book and got the following to work: > LiftRules.dispatch.prepend{ > case r @Req("Portraits"::"High-School"::"Seniors"::_::Nil, > _,_) => () =>Full(PermRedirectResponse("/Galleries/HighSchoolSeniors", > r)) > } > LiftRules.dispatch.prepend{ > case r @Req("Portraits"::"High-School"::"Seniors"::_::_::Nil, > _,_) => () =>Full(PermRedirectResponse("/Galleries/HighSchoolSeniors", > r)) > } > LiftRules.dispatch.prepend{ > case r @Req("Portraits"::"High- > School"::"Seniors"::_::_::_::Nil, _,_) => () > =>Full(PermRedirectResponse("/Galleries/HighSchoolSeniors", r)) > } > > This gives me a beautiful 301 redirect, so the world is good. Google > will transfer any page rank and any old links will work. > > But it seem like there should be a nicer way to do this for arbitrary > depth. I know that doesn't make much sense for an API, but it would > be nice for me if there was an equivalent of "/Portraits/High-School/ > **" for arbitrary depth matching.
Does this work for you: LiftRules.dispatch.prepend{ case r @Req("Portraits"::"High-School"::"Seniors"::_,_,_) => () =>Full(PermRedirectResponse("/assets/list",r)) } /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@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.