Paul,

The basic problem here is that whatever you put in the RewiteResponse must
be in your SiteMap. So, to get a url like /customer/list/1 to be rewritten
to /cust.html?page=1

you would need:

Menu(Loc("Customers",
"cust"::Nil, "Customers"))

in your SiteMap. Doing this however means that your menu link will be /cust
and you would have to manually generate your links.

I am running into this same "problem" and haven't figured out how to handle
it yet.

Tim

On Fri, Aug 7, 2009 at 11:28 AM, pabraham <paulabraham...@googlemail.com>wrote:

>
> Hello again,
>
> I've been looking at the article on URL rewriting at [1] and am having
> a problem getting a URL rewrite to work.
>
> My sitemap contains Menu(Loc("Customers",
> "customer"::"list"::"1"::Nil, "Customers")), so clicking on Customers
> gives a link to /customer/list/1.
>
> My rewrite is:
>    LiftRules.rewrite.append {
>      case RewriteRequest(ParsePath("customer"::"list"::page::Nil, _,
> _, _), _, _) =>
>      RewriteResponse("cust" :: Nil, Map("page" -> page))
>    }
>
> so clicking on /customer/list/1 should show cust.html and give me a
> "page" parameter.  The cust.html file exists.
>
> Unfortunately I get "The Requested URL /customer/list/1 was not found
> on this server".
>
> Do I need to do anything else to get this to work?
>
> Paul.
>
> [1] http://wiki.github.com/dpp/liftweb/about-url-rewriting
>
> >
>

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