Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Avatar

Level 8

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]"

        />

2 Replies

Avatar

Level 8

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?