1
votes

What are the best practices for assigning vanity URL to a content page in AEM 6.1.

When an author mentions a vanity path to a page and activates it, it does not really reflect in publish. Problem I observed is: when the save operation carries out on page vanity property, it saves an rewrite rule at the map location, which is generally at /etc/map unless it is specifically changed.

So when the page containing vanity path activates then this rewrite rule does not really activates along, although the JCRResorceResolver map location is same for publish and author instance which is /etc/map.

Therefore, I wanted to understand what is the way of activating the resource resolver rewrite rule along with page activation? Or are there any best practices that the vanity should not be given a control to page editors and should only be performed by an administrator directly in publish instance?

1

1 Answers

0
votes

/etc/map has nothing to do with vanity urls. In /etc/map you can manually add some path/host to resource mappings. When an editor adds a vanity url, the resource resolver(s) will catch that event and add the url to their list - if a page with a vanity url is published, the AEM publish servers will also add the vanity url automativally to their resolvers.

Take a look at /system/console/jcrresolver on both author and publish. You should see the vanity url on both machines.

If you want your vanity url on root level, it should start with "/". Other things that might prevent the vanity url from working:

  • You might have additional mapping rules on /etc/map(.*).
  • There is a dispatcher in front of your CQ/AEM Publish server that is filtering or manipulating the incoming urls.

What exactly is the vanity url added by your editor (content path and content of field vanity url) and what is the url you are calling to get the page via vanity url on the publish instance?