Hi,

On Sat, Nov 22, 2008 at 1:11 AM, Roy T. Fielding <[EMAIL PROTECTED]> wrote:
> ...I think that Sling should use a content tree to establish the
> root mappings;  e.g.,
>
>  /etc/map/{scheme}/{host.port}/{uri_path}...

Agreed, much better to have this info in one place.

Some comments below on the /etc/map details.

>  /etc/map/http/example.com.80/
>                   +-- sling:redirect = "http://www.example.com/";

I like "redirect" as the property name, better than "target" suggested
by someone in this thread, which is less precise.

>                www.example.com.80/
>                   +-- sling:alias = "/example/"

I think we need variables here, for multi-host setups - and I'd call
the property a "content prefix" as it is really what it's doing:
prepend a path to the one supplied by the URL to find content.

Vidar also suggested (IIRC) falling back to a different path if the
resource is not found, for common css style sheets for example, so my
proposal here is:

                /etc/map/http/www.*.com.80/
                   +-- sling:contentPrefix = "/content/sites/{1}/
                   +-- sling:fallbackContent = "/content/default/

Where {1} maps to the first wildcard defined by the parent node.

and that would also require variables in redirects, so:

                /etc/map/http/*.com.80/
                   +-- sling:redirect = "http://www.{1}.com";

Or, to force https:

                /etc/map/http/*.com.80/
                   +-- sling:redirect = "https://www.{1}.com";


-Bertrand

Reply via email to