Highlighted

Java/AEM: com.day.cq.commons.Externalizer absoluteLink function returning the wrong hostname

Avatar

Avatar

jayv25585659

Avatar

jayv25585659

jayv25585659

04-09-2018

I have an existing site hosted under www.myhost.com. I created a new "site" and using apache config/rewrites, this is hosted under new.myhost.com.

The problem is that when I make a request (example: www.myhost.com/my-servlet/lets-go), the values returned by absoluteLink function uses "new.myhost.com" instead of www.myhost.com.

I have several "com.day.cq.commons.impl.Externalizer.xml" files in my code but none of them has been configured for "new.myhost.com".

Any ideas on how to fix? Thanks

edit1: I also checked publisher configMgr and the new host is not listed in "Day CQ Link Externalizer" (pid=com.day.cq.commons.impl.ExternalizerImpl).

<?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:OsgiConfig"

          externalizer.domains="[local http://localhost:4502, author http://author.myhost.com, publish http://localhost:4503, stage http://stage.myhost.com, prod http://www.myhost.com]"

        />

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

04-09-2018

Have you written an Apache Sling Rewriter module for AEM?

Apache Sling :: Output Rewriting Pipelines (org.apache.sling.rewriter)

Highlighted

Avatar

Avatar

jayv25585659

Avatar

jayv25585659

jayv25585659

04-09-2018

Hello smacdonald2008​. I looked at the linked document and also looked at our code base. I do not think we are using a rewriter. Should we use one?