You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Vidar Ramdal <vi...@idium.no> on 2008/02/15 15:52:44 UTC

Content mapping based on domain

OK, last question before I call it a weekend:

I'd like to host multiple sites (internet domains) on a single Sling
app. How can I map a domain to a JCR node?

Example:
www.domain1.com maps to /content/domain1.com
www.domain2.com maps to /content/domain2.com

An option would be to redirect the browser, so that
http://www.domain1.com redirects to
http://www.domain1.com/domain1.com, but this is not ideal.

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Re: Content mapping based on domain

Posted by Felix Meschberger <fm...@gmail.com>.
Cool. Thanks and a nice weekend to you, too.

Regards
Felix

Am Freitag, den 15.02.2008, 16:28 +0100 schrieb Vidar Ramdal:
> >  Am Freitag, den 15.02.2008, 15:52 +0100 schrieb Vidar Ramdal:
> > > OK, last question before I call it a weekend:
> >  >
> >  > I'd like to host multiple sites (internet domains) on a single Sling
> >  > app. How can I map a domain to a JCR node?
> >  >
> >  > Example:
> >  > www.domain1.com maps to /content/domain1.com
> >  > www.domain2.com maps to /content/domain2.com
> >  >
> >  > An option would be to redirect the browser, so that
> >  > http://www.domain1.com redirects to
> >  > http://www.domain1.com/domain1.com, but this is not ideal.
> 
> On 2/15/08, Felix Meschberger <fm...@gmail.com> wrote:
> > This is really, an interesting request. At the moment, this is not
> >  possible (aka implemented) but, I could imagine, that this would be
> >  implemented in the JcrResourceResolver.resolve(String) method which
> >  already contains two mapping facilities for virtual URL paths (like "/"
> >  is really "/content/home.html") and mapped URLs (like "/home.html" is
> >  really "/content/home.html").
> >
> >  Extending this to include the request host name would be possible. If
> >  you could file an enhancement request JIRA, we could track this more
> >  easily. Thanks.
> 
> Yup, it is now https://issues.apache.org/jira/browse/SLING-249
> Have a great weekend!
> 


Re: Content mapping based on domain

Posted by Vidar Ramdal <vi...@idium.no>.
>  Am Freitag, den 15.02.2008, 15:52 +0100 schrieb Vidar Ramdal:
> > OK, last question before I call it a weekend:
>  >
>  > I'd like to host multiple sites (internet domains) on a single Sling
>  > app. How can I map a domain to a JCR node?
>  >
>  > Example:
>  > www.domain1.com maps to /content/domain1.com
>  > www.domain2.com maps to /content/domain2.com
>  >
>  > An option would be to redirect the browser, so that
>  > http://www.domain1.com redirects to
>  > http://www.domain1.com/domain1.com, but this is not ideal.

On 2/15/08, Felix Meschberger <fm...@gmail.com> wrote:
> This is really, an interesting request. At the moment, this is not
>  possible (aka implemented) but, I could imagine, that this would be
>  implemented in the JcrResourceResolver.resolve(String) method which
>  already contains two mapping facilities for virtual URL paths (like "/"
>  is really "/content/home.html") and mapped URLs (like "/home.html" is
>  really "/content/home.html").
>
>  Extending this to include the request host name would be possible. If
>  you could file an enhancement request JIRA, we could track this more
>  easily. Thanks.

Yup, it is now https://issues.apache.org/jira/browse/SLING-249
Have a great weekend!

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Re: Content mapping based on domain

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Vidal,

Am Freitag, den 15.02.2008, 15:52 +0100 schrieb Vidar Ramdal:
> OK, last question before I call it a weekend:
> 
> I'd like to host multiple sites (internet domains) on a single Sling
> app. How can I map a domain to a JCR node?
> 
> Example:
> www.domain1.com maps to /content/domain1.com
> www.domain2.com maps to /content/domain2.com
> 
> An option would be to redirect the browser, so that
> http://www.domain1.com redirects to
> http://www.domain1.com/domain1.com, but this is not ideal.
> 

This is really, an interesting request. At the moment, this is not
possible (aka implemented) but, I could imagine, that this would be
implemented in the JcrResourceResolver.resolve(String) method which
already contains two mapping facilities for virtual URL paths (like "/"
is really "/content/home.html") and mapped URLs (like "/home.html" is
really "/content/home.html").

Extending this to include the request host name would be possible. If
you could file an enhancement request JIRA, we could track this more
easily. Thanks.

Regards
Felix