Expand my Community achievements bar.

Hide /content root path in publish and website domains | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Hide /content root path in publish and website domains by aemtutorial

Abstract

How do we hide the '/content/sitename' from the URL?

It is always good to hide the content path from the public domain or publish server urls. Let us see one of the best approach for the same.
Say we have our website in below domain URL,
--> https://[websitename.com]/content/sitename/fr/home.html

And hosted AEM with below URL,
--> http://:/content/sitename/fr/home.html

As a best practice and recommended option, we have to ensure the '/content/sitename' is hidden from appearing on the public domain.
Here I am going to explain one of the best approach for achieving the same. To achieve this, we will have to configure things on both publish and dispatcher.


Configurations on PUBLISH:
Configuring the Apache Sling Resource Resolver Factory to ensure the URLs are re-written at PUBLISH server.
Apache Sling Resource Resolver Factory - add below configurations
--> /content/sitename/(.*)</$1
--> /content/sitename/fr$1>/fr(.*)

One you save the configuration, and hit the webpage with http://:/fr/home.html, you will be able to see the home page over publish instance(without /content/sitename).

Read Full Blog

Hide /content root path in publish and website domains

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies