I have 3 sites in my AEM instance.
- /content/staff (staff.myhost.com)
- /content/customer (customer.myhost.com)
- /content/others (others.myhost.com`)
I have a page in /content/staff (example: /content/staff/en/sample-page). In this page, I have created a link to /content/customer/en/my-page-here.
When I published my page, the link URL is displayed as customer.myhost.com/my-page-here and this is correct.
The problem is that if I create another link on /content/staff/en/sample-page to a PDF that resides in the DAM area (example: /content/dam/customer/my-pdf-here.pdf) for the customer site, no rewriting is showing.
The PDF link is shown as staff.myhost.com/content/dam/customer/my-pdf-here.pdf. It should be shown as customer.myhost.com/content/dam/customer/my-pdf-here.pdf.
Any ideas what I could be doing wrong?
I have the following mapping
<?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:internalRedirect="[/content/customer/en(/.+)?,/content/dam/customer(/.+)?]"
sling:match="customer.myhost.com$1"/>