1
votes

I am trying to setup vanity url in AEM 6.4. Followed and verified the below steps

  • Installed the VanityURLS-Components
  • Allowed ‘Read’ permission to /libs/granite/dispatcher/content/vanityUrls for the ‘everyone’ group on the publish servers
  • Added a filter rule in the dispatcher to allow the vanity URL

    /0100 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" }

  • Added a caching rule to prevent caching of this URL

    /0001 { /type "deny" /glob "/libs/granite/dispatcher/content/vanityUrls.html" }

  • Added the vanity_urls configuration to the farm:

    /vanity_urls { /url "/libs/granite/dispatcher/content/vanityUrls.html" /file "/xxx/vanity_urls" /delay 300 }

  • Restarted webserver

  • Created a file inside file location and provide required write permission. -rwxr-xr-x 1 apache apache 0 May 14 14:26 vanity_urls
  • Verified /libs/granite/dispatcher/content/vanityUrls.html page is accessible from pub as anonymous request
  • Verified /libs/granite/dispatcher/content/vanityUrls.html page is accessible from dispatcher
  • Verified all required modues are enabled in Apache
  • Verified that dispatcher is calling pub server upon hitting the /libs/granite/dispatcher/content/vanityUrls.html, seeing logs in request.log
  • Finally restarted Apache Sling Resource Resolver bundle and simply saved it's configuration and restarted AEM server

The vanityurl is working only on publisher server and not on the dispatcher side.I have tried all the possible option but could not find out why it is not working? Has anyone faced similar issue? Please help me to investigate further on this issue?

1
Are you getting 404? Standard requests do work properly (they are cached, 200 response)?ronnyfm
Yes, I am getting 404. We dont cache the vanityURL requestezhil
Please enable more logging from the dispatcher, to read what exactly reports as the cause. Also, on the publish instance, you can take a look at the request.log to see what is actually being sent from the dispatcher to AEM.ronnyfm

1 Answers

0
votes

Try configuring default redirect status to vanity url in apache sling resource resolver factory of publisher.configure it to be 302