Vanity URL is not getting JCR:CONTENT | Community
Skip to main content
Level 2
May 4, 2020
Solved

Vanity URL is not getting JCR:CONTENT

  • May 4, 2020
  • 2 replies
  • 3093 views

Hi there, 

 

I have a request where we need to collect some data from the components, so we need to consume the jcr:content.json but when a page have a vanity applied it responses with a 404. 

Page : /en/myvanitypage.html OK 200

jcr : /en/myvanitypage/_jcr_content.json 404 

 

Do you know if there is a bug here, i'm using aem OOB? 

 

Regards.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ArpitVarshney

Hi @naxtyn_ 

a vanity URL is, “a unique web address that is branded for marketing purposes … a custom URL that exists to help users remember and find a specific page of your website.”

I think this is expected behaviour and not a bug. You need to use the actual url which point to corresponding node in aem to get the json of that page.

 

Regards,

Arpit

2 replies

ArpitVarshney
Community Advisor
ArpitVarshneyCommunity AdvisorAccepted solution
Community Advisor
May 4, 2020

Hi @naxtyn_ 

a vanity URL is, “a unique web address that is branded for marketing purposes … a custom URL that exists to help users remember and find a specific page of your website.”

I think this is expected behaviour and not a bug. You need to use the actual url which point to corresponding node in aem to get the json of that page.

 

Regards,

Arpit

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 4, 2020

When enabling "vanity URL" on a page, only the set value can be used to resolve the page. 

The value set as "/hello/world" resolves to the page "/hello/world.html" && "/hello/world.json", and throws a 404 not found when "/hello/world/jcr:content.json" is requested; this is expected.