How to prioritize Sling internalRedirect ?
I have a situation where I have two mappings in etc.maps with `sling:internalRedirects`.
Map 1: maps /content/brand to a custom domain name, brand.com
Map 2: maps /content/brand/retailers/retailer to a custom domain name, retailer.brand.com
My issues is map 1 is prioritized over map 2.
I always get brand.com/retailers/retailers instead of retailer.brand.com.
Yet, I can clearly see it as a 2nd option in "Other Candidates" in the JCR Resolver at http://localhost:4503/system/console/jcrresolver.
Map 1
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:match="content/brand/country(.+)"
sling:internalRedirect="[/content/brand/country$1]"/>
Map 2
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:match="content/brand/country/retailers/retailer(.*)"
sling:internalRedirect="[/content/brand/country/retailers/retailer$1]"/>
How could I make sure Map 2 is used?