Expand my Community achievements bar.

SOLVED

How does sling interpret an internalRedirect that has two values?

Avatar

Level 7

Hi,

In Multidomain CQ mappings and Apache configuration, there's an internalRedirect defined that has two values:

geometrixx.com: {
    sling:internalRedirect: ["/content/geometrixx/en"],
    jcr:primaryType: "sling:Mapping",
    redirect: {
        sling:internalRedirect: ["/content/geometrixx/en/$1","/$1"],
        jcr:primaryType: "sling:Mapping",
        sling:match: "(.+)$"
    }
}

How does Sling interpret such multi-value internal redirects?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi.

this isn't really a multi-value internal redirect.

In the text below the code snippet Cognifide explains it like this:

Mapping geometrixx.com (7-15) is more complex. It consists of the parent (7-15) and the child (10-14). The parent does not contain the sling:match property, so the node name (geometrixx.com) is used as a URL pattern. This entry is responsible for shortening long links to a shorter form with a domain name, e.g. /content/geometrixx/en/products will be shortened to geometrixx.com/products.html.

That explains it quite well.

Jörg

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Hi.

this isn't really a multi-value internal redirect.

In the text below the code snippet Cognifide explains it like this:

Mapping geometrixx.com (7-15) is more complex. It consists of the parent (7-15) and the child (10-14). The parent does not contain the sling:match property, so the node name (geometrixx.com) is used as a URL pattern. This entry is responsible for shortening long links to a shorter form with a domain name, e.g. /content/geometrixx/en/products will be shortened to geometrixx.com/products.html.

That explains it quite well.

Jörg