AEM 6.0 vanity URLs under /content/dam unavailable after restart | Community
Skip to main content
March 9, 2017
Solved

AEM 6.0 vanity URLs under /content/dam unavailable after restart

  • March 9, 2017
  • 4 replies
  • 1485 views

I'm manually creating vanity URLs on assets by setting the sling:vanityPath parameter under the asset's content node. This works fine for pages, and initially is working great for dam assets, but after rebooting the assets are no longer available under the vanity URLs and return a 404. Is there some other place I need to configure them?

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 smacdonald2008

Looks like AEM has a bug. I CAN reproduce this! I recommend opening a ticket so support can investigate. 

4 replies

kautuk_sahni
Community Manager
Community Manager
March 9, 2017

Hi,

The concept of vanity path is:

Go to the jcr:content node of Page/Asset and add a property "sling:vanityPath"  with some "Value".

This will create a Vanity URL for that Node.

For Assets:

1. Go to the assets in crx/de

2. open jcr:content of that PDF/Image/Asste.

3. Add """sling:vanityPath"  with some "Value"

Now open "http://localhost:4502/<Value>"

I tried this and it is working for me. Unable to reproduce this behavior. 

~kautuk

Kautuk Sahni
March 9, 2017

Did you then shutdown and restart the server?  We've tried this on multiple servers and multiple AEM versions now and the behavior is the same.  The initial sling:vanityPath setting works, but after a restart it no longer does.  Also it works for pages, just not assets.  It looks like the Resource Resolver is only being initialized with vanityPaths from page assets. 

smacdonald2008
smacdonald2008Accepted solution
Level 10
March 9, 2017

Looks like AEM has a bug. I CAN reproduce this! I recommend opening a ticket so support can investigate. 

smacdonald2008
Level 10
March 9, 2017

After starting - what did work - renders: 

<html> <head> <title>File not found</title> </head> <body> <p>A custom errorhandler for 404 responses</p> </body> </html>