Enabling Vanity URLs with Adobe Experience Manager



Statement -  Handling Vanity URLs Using the AEM Dispatcher Module

Solution:


  • Recent updates to the AEM Dispatcher module (since version 4.1.9 of the module) allow authors to directly control vanity URLs from within the Author UI, and these are automatically pushed out to the publishers, which then expose them to the dispatchers. 

AEM

Steps to be followed:
/0100 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" }
  • Add a caching rule to prevent caching of this URL:
/0001 { /type "deny" /glob
"/libs/granite/dispatcher/content/vanityUrls.html" }
  • Add the vanity_urls configuration to the farm:
/vanity_urls {
/url "/libs/granite/dispatcher/content/vanityUrls.html"
/file "/tmp/vanity_urls"
/delay 300
}

  • Re-start Apache.
  • The file defined at the /file setting is not automatically created/updated at the time interval set at /delay, but only when a request is made that fails the /filter rules of your dispatcher. On fail, it checks to see if the file is there —
  •  if not, it will generate and use it by pulling /libs/granite/dispatcher/content/vanityUrls.html from the publisher. If it is there, and not older than /delay seconds, it will use it. Finally, if it is older than /delay seconds, it will update it from the Publish instance and use it.

No comments:

Post a Comment