[Lift] Re: url rewrite subdomain?

2009-07-26 Thread marius d.
Yeah but that would mean to have another extractor object with a different name such as RewriteRequestExt for instance ... seams unsound to me in this case. But sure, it's an option. Br's, Marius On Jul 26, 10:52 pm, Naftoli Gugenheim wrote: > Which is why I referenced QNode -- it is a 3-LOC ob

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread Naftoli Gugenheim
Which is why I referenced QNode -- it is a 3-LOC object for the sole purpose of supplying an extractor that couldn't go into Elem because of the problem you stated. :) - marius d. wrote: That probably won't work as RewriteRequest is already a case class wh

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread marius d.
That probably won't work as RewriteRequest is already a case class which means that unapply is defined. AFAIK building an extractor that yields different types is not possible . For instance we can not have: def unapply(r: RewriteRequest): Option[(ParseHost, ParsePath, RequestType, HttpServletR

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread Naftoli Gugenheim
It doesn't necessarily have to be a breaking change. See for example scala.xml.QNode. - marius d. wrote: Well RewriteRequest/Response are currently defined as: case class RewriteRequest(path: ParsePath, requestType: RequestType, httpRequest: HttpServletRequ

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread Timothy Perrett
haha your most welcome - glad I can help... I've written a bunch of articles about lift, all of which you can find here: http://blog.getintheloop.eu/tags/lift Cheers, Tim On Jul 26, 1:50 pm, JanWillem Tulp wrote: > Seems like you have an article for all of my questions, Timothy ;) > Thanks!! >

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread JanWillem Tulp
Seems like you have an article for all of my questions, Timothy ;) Thanks!! On Jul 26, 2:37 pm, Timothy Perrett wrote: > JanWillem, > > You might find this article I wrote on URL rewriting helpful:http://is.gd/wq4K > > Cheers, Tim > > On 26/07/2009 13:10, "JanWillem Tulp" wrote: > > > > > > > H

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread Timothy Perrett
JanWillem, You might find this article I wrote on URL rewriting helpful: http://is.gd/wq4K Cheers, Tim On 26/07/2009 13:10, "JanWillem Tulp" wrote: > > Hi Marius, > > thanks for your reply, and the better understanding of URL rewrites. > For now I'll stick to rewriting the path. > > Regar

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread JanWillem Tulp
Hi Marius, thanks for your reply, and the better understanding of URL rewrites. For now I'll stick to rewriting the path. Regards, JanWillem On Jul 26, 1:49 pm, "marius d." wrote: > Well RewriteRequest/Response are currently defined as: > > case class RewriteRequest(path: ParsePath, requestTyp

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread marius d.
Well RewriteRequest/Response are currently defined as: case class RewriteRequest(path: ParsePath, requestType: RequestType, httpRequest: HttpServletRequest) case class RewriteResponse(path: ParsePath, params: Map[String, String], stopRewriting: Boolean) so having HttpServketRequest in RewriteReq

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread JanWillem Tulp
Yeah, Marius, you're right. I was just wondering how they've implemented this feature, for example at www.basecamphq.com. If you signup, you get a URL that starts with your account name, something like: myacount.basecamphq.com. How is that done? Or better, how to do something similar in Lift? T

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread Timothy Perrett
Id say this is a fairly common idiom with multi-tenant systems... Cheers, Tim On Jul 26, 8:30 am, "marius d." wrote: > What is the usecase of rewriting the hostname? ... Having multiple > subdomains mapped to the same IP address and want to discriminate > them? > > Br's, > Marius > > On Jul 26,

[Lift] Re: url rewrite subdomain?

2009-07-26 Thread marius d.
What is the usecase of rewriting the hostname? ... Having multiple subdomains mapped to the same IP address and want to discriminate them? Br's, Marius On Jul 26, 1:22 am, JanWillem Tulp wrote: > Hi all, > > most examples I have seen about Lift URL rewriting are about the path > of the URL, th