Expand my Community achievements bar.

SOLVED

Vanity URLs

Avatar

Level 1

Hello!

 

I'm trying to create some Vanity URLs on Adobe AEM but for some reason none of them have been working. When I go to test them they all redirect to an error page.

I'm not sure what I could be doing incorrectly that the cause vanity URLs to not work.

 

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Maggie,

can you list the list URL to the original page, the JSON ouput for the jcr:content node and the vanity url you are trying? The image you attached does not have a vanity url set.

 

For example on my author instance I just created a vanity URL (The same way Graham described) "/coats" for http://localhost:4502/content/geometrixx-outdoors/en/men/coats.html 

http://localhost:4502/content/geometrixx-outdoors/en/men/coats/jcr%3Acontent.tidy.json

{ "jcr:primaryType": "cq:PageContent", "jcr:mixinTypes": [ "cq:LiveSync", "cq:PropertyLiveSyncCancelled" ], "jcr:createdBy": "admin", "jcr:title": "Coats", "cq:catalogBlueprint": "/content/catalogs/geometrixx-outdoors/en/base-catalog/men/coats", "cq:propertyInheritanceCancelled": ["sling:vanityPath"], "cq:template": "/apps/geometrixx-outdoors/templates/page_sidebar", "jcr:created": "Mon Nov 30 2015 15:21:50 GMT+0000", "cq:lastModified": "Tue Dec 22 2015 16:18:00 GMT+0000", "sling:vanityPath": "/coats", "sling:resourceType": "geometrixx-outdoors/components/page_sidebar", "cq:commerceType": "section", "cq:lastModifiedBy": "admin" }

 

So I can access the page at http://localhost:4502/content/geometrixx-outdoors/en/men/coats.html and http://localhost:4502/coats.html

Regards,

Opkar

View solution in original post

2 Replies

Avatar

Employee

Can you provide an example of a vanity that you are entering into the vanity url field?

Here is an example that worked for me in 6.1:

  1. Go to http://localhost:4502/editor.html/content/geometrixx/en/products.html
  2. Edit Properties
  3. In the General Tab Enter a vanity with the value "/products"
  4. Save
  5. Go to http://localhost:4502/products

Avatar

Correct answer by
Employee

Hi Maggie,

can you list the list URL to the original page, the JSON ouput for the jcr:content node and the vanity url you are trying? The image you attached does not have a vanity url set.

 

For example on my author instance I just created a vanity URL (The same way Graham described) "/coats" for http://localhost:4502/content/geometrixx-outdoors/en/men/coats.html 

http://localhost:4502/content/geometrixx-outdoors/en/men/coats/jcr%3Acontent.tidy.json

{ "jcr:primaryType": "cq:PageContent", "jcr:mixinTypes": [ "cq:LiveSync", "cq:PropertyLiveSyncCancelled" ], "jcr:createdBy": "admin", "jcr:title": "Coats", "cq:catalogBlueprint": "/content/catalogs/geometrixx-outdoors/en/base-catalog/men/coats", "cq:propertyInheritanceCancelled": ["sling:vanityPath"], "cq:template": "/apps/geometrixx-outdoors/templates/page_sidebar", "jcr:created": "Mon Nov 30 2015 15:21:50 GMT+0000", "cq:lastModified": "Tue Dec 22 2015 16:18:00 GMT+0000", "sling:vanityPath": "/coats", "sling:resourceType": "geometrixx-outdoors/components/page_sidebar", "cq:commerceType": "section", "cq:lastModifiedBy": "admin" }

 

So I can access the page at http://localhost:4502/content/geometrixx-outdoors/en/men/coats.html and http://localhost:4502/coats.html

Regards,

Opkar