Please don't do this. It will open up every xml, html, and xhtml file in your webapp directory to viewing. It is very, very dangerous.
On Tue, Dec 29, 2009 at 9:09 AM, Alex Black <[email protected]> wrote: > I got this working, like this: > > Menu(Loc("Catchall", Pair(Nil, true), "", homepageTemp1 :: > Hidden :: Nil)) :: > > If you add this as the last item in your sitemap, it will catch > everything that the other menus don't catch, and render it with the > template you defined in homepageTemp1. > > This *almost* works for 404 handling, except you still get a 200 OK > response when you would expect a 404. I am hoping there is some > mechanism in lift to let me change the status code to 404 for this > menu. > > - Alex > > On Dec 29, 11:10 am, Alex Black <[email protected]> wrote: > > In my effort to handle 404s without a redirect (seehttp:// > groups.google.com/group/liftweb/browse_thread/thread/4a9806a63...), > > I am wondering if there is a way to add an item at the end of a > > sitemap which matches every url? > > > > E.g. Lift would look through the sitemap for a match, and always match > > on the last item if none of the others match. > > > > I've tried this: > > > > val homepageTemp1 = Template({ () => > > <lift:surround with="default" at="content"> > > <h1>Found me!</h1> > > </lift:surround> }) > > > > with this at the end of my sitemap: > > > > Menu(Loc("Catchall", Pair("" :: Nil, true), "", homepageTemp1)) :: > > > > But it doesn't work, it never matches. However: > > > > Menu(Loc("Catchall", Pair("bob" :: Nil, true), "", > > homepageTemp1)) :: > > > > That one does match one urls like mysite.com/bob and mysite.com/bob/ > > 1234 etc. > > > > - Alex > > -- > > 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]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- 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 [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.
