All my templates are index.html. I use the folder name. And I never call them by index (I rewrote the Menu functions to avoid that). So I call /the_book/ and I get /the_book/index.html. But if someone entered /the_book/index.html, I'd still want it to work.
But you've made me realize that this might work: LiftRules.dispatch.prepend { case r @ Req(page :: Nil, "html", _) => if (page != "index") => Full(PermRedirectResponse("/", r)) } That said, using this one I give up specific redirects in favor of sending everything to the home page. I think I like the other one better. Thanks for all your help! Chas. Tim Perrett wrote: > When you say all your pages are index.html, how do you mean? if your > file is index.html, in lift the URI would be /index right? > > >> Anyway, this helps a lot. So if I want to redirect thebook.html to >> /the_book/ I would do this: >> >> LiftRules.dispatch.prepend { >> case r @ Req("thebook" :: Nil, "html", _) => () => Full( >> PermRedirectResponse("/the_book", r)) >> > > Correct :-) > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---