Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

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

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

4 Replies

Avatar

Administrator

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

Avatar

Level 1

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. 

Avatar

Correct answer by
Level 10

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

Avatar

Level 10

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>