happstack subdomain routing
Hello, You can use the 'host' or 'withHost' combinators: http://www.happstack.com/docs/happstack-server-7.0.2/doc/html/happstack-serv... Those are actually intended for virtual hosts where you match on the whole domain. I suppose we could add a variant that makes it easier to match just the sub-domain portion. Not quite sure what the rules for that would be though. For most domains, you just drop the last two parts: foo.example.org -> foo But, for .co.uk address that would be a bit funny: foo.example.co.uk -> foo.example So.. we need to figure out a more sensible rule.. Or you just need to match on the FQDN. Is there some correct way to identify a sub-domain? Maybe we just take everything before the first . and consider that the sub-domain? - jeremy On Sun, May 27, 2012 at 2:47 PM, Asafe Ribeiro <asafe.hai.kai@gmail.com> wrote:
How do I do subdomain routing on happstack?
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
participants (2)
-
Asafe Ribeiro -
Jeremy Shaw