AEM Vanity URL is unique, short, descriptive and easy to remember version of actual page URL.
Actual URL — http://localhost/language/aem/practice-aem-vanity.html
Vanity URL — http://localhost/aem-vanity.html
1. Navigate to this URL and download vanity URL’s components package.
2. Accept EULA terms and conditions and press download button highlighted red in color.
3. Upload vanityurls-components package and install on publish instance:
4. In publish instance, everyone group must have Read permission to below hierarchy:
/libs/granite/dispatcher/content/vanityUrls
5. Open dispatcher.any and add below line to allow vanity URL rule under /filter section
/0XYZ { /type “allow” /url “/libs/granite/dispatcher/content/vanityUrls.html” }
6. In same dispatcher.any file add below line under /rules sub-section of /cache section
/00XYZ { /type “deny” /glob “/libs/granite/dispatcher/content/vanityUrls.html” }
7. Add below line in dispatcher.any file will auto-allow the item or by pass the normal dispatcher, once vanity package is installed on publishers.
/vanity_urls {
/url "/libs/granite/dispatcher/content/vanityUrls.html"
/file "/tmp/vanity_urls"
/delay 300
}
8. Restart the Apache webserver to see latest changes.
9. Open page properties, scroll down below to Vanity URL section and author mens.html as vanity URL. Provide vanity URL and click on Save & Close button.
Publish the page once authoring is done.
10. Open below authored dispatcher vanity URL
http://localhost/mens.html
11. Author Redirect Vanity URL as true and publish page will for 301 internal redirect to actual page path.
Opening vanity URL http://localhost/mens.html in chrome browser will redirect to actual URL http://localhost/content/we-retail/us/en/men.html.
12. Open below URL to check all the vanity URL’s present:
http://localhost/libs/granite/dispatcher/content/vanityUrls.html
Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.
📝 Blogs
javadoubts.com © All rights reserved