Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

05-07-2020

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.

AEM AEMEBlogSeeding Experience Manager