Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 25
Level 4
jayv25585659
Level 4

Likes

46 likes

Total Posts

123 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Validate 25
Level 4
jayv25585659
Level 4

Likes

46 likes

Total Posts

123 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 5
View profile
jayv25585659
Level 4

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

04-09-2018

Have you written an Apache Sling Rewriter module for AEM?

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

Avatar

Avatar
Validate 25
Level 4
jayv25585659
Level 4

Likes

46 likes

Total Posts

123 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Validate 25
Level 4
jayv25585659
Level 4

Likes

46 likes

Total Posts

123 posts

Correct Reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 5
View profile
jayv25585659
Level 4

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?