Exposing full content path on Publish | Community
Skip to main content
Level 3
June 20, 2021
Solved

Exposing full content path on Publish

  • June 20, 2021
  • 3 replies
  • 1564 views

Hi All,

We had properly implemented the maps configuration to show the short URL in publish on dev environment  inspite it is showing the full content path in the browser?

Could you please suggest your thoughts on this 

Note:Mapping configuration working as expected on stage and prod.

 

Thanks in advance!

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 Ritesh_Mittal

Hi @keerthi97 ,

 

If I understood your question, your HTML mark-up (links on the page are still showing full path). In that case, we need to understand one thing-

 

Below can be options to short the URL inside mark-up-

 

  • Sling mapping (etc/map) has been created

               OR

  • Sling Resource Resolver Factory has been configured to make the URL short

               OR

  • Have written custom Sling rewriter link transformer, which  traverses the web page and shorts all URLs.

 

Apache mod_rewrite is out of scope since it only rewrites incoming requests, and does not rewrite inside HTML mark-up.

 

Now considering you have mentioned about etc/map, so I would suggest to check below URL on each environment and verify if the redirects look fine-

 

http://<HOST>:<PORT>/system/console/jcrresolver

 

Reference videos to understand the concept-

https://www.youtube.com/watch?v=zcKwRTZ78_Y

https://www.youtube.com/watch?v=0fM2vUEj2bA

3 replies

Vijayalakshmi_S
Level 10
June 21, 2021

Hi @keerthi97,

Given that it works in Stage and PROD, I suggest to compare all possible configurations at

  • AEM instance level (etc/map package + Resource Resolver OSGI Configuration -> URL Mapping entry + vanity url if any) and
  • Webserver level (Apache rewrites) 

Also, check the dispatcher log (set at debug level) and access.log of both webserver and AEM instance as you access the page. 

Ritesh_Mittal
Community Advisor and Adobe Champion
Ritesh_MittalCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
June 21, 2021

Hi @keerthi97 ,

 

If I understood your question, your HTML mark-up (links on the page are still showing full path). In that case, we need to understand one thing-

 

Below can be options to short the URL inside mark-up-

 

  • Sling mapping (etc/map) has been created

               OR

  • Sling Resource Resolver Factory has been configured to make the URL short

               OR

  • Have written custom Sling rewriter link transformer, which  traverses the web page and shorts all URLs.

 

Apache mod_rewrite is out of scope since it only rewrites incoming requests, and does not rewrite inside HTML mark-up.

 

Now considering you have mentioned about etc/map, so I would suggest to check below URL on each environment and verify if the redirects look fine-

 

http://<HOST>:<PORT>/system/console/jcrresolver

 

Reference videos to understand the concept-

https://www.youtube.com/watch?v=zcKwRTZ78_Y

https://www.youtube.com/watch?v=0fM2vUEj2bA

Nikhil-Kumar
Community Advisor
Community Advisor
June 21, 2021

@keerthi97  - To cross check, can you verify if you are giving absolute path in the field mapping w.r.t stage and prod URL