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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to remove years and months from the urls

Avatar

Level 1

We have a use case where we want to create the hierarchy in AEM author where the pages will be created under years and months but for the end-user, we don't want to display the years and months in the URLs.

Is this something that can be achieved via Apache and dispatcher rules?

Thanks,

Nikunj Jariwala

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor
4 Replies

Avatar

Level 1

Thanks for replying Vish.dhaliwal​.

The set up works as expected when we have static paths like /content/site_name/en. My question is around the dynamic aspect of the path i.e. there will be many years and months pages in the hierarchy.

for example, the content in AEM will look like the following:

/content/site_name/en/news/articles/2019/07/news-article-1.html

/content/site_name/en/news/articles/2018/06/news-article-2.html

/content/site_name/en/news/articles/2015/04/news-article-3.html

The end-user should be able to access the pages using the following:

http://example.com/en/news/articles/news-article-1.html

http://example.com/en/news/articles/news-article-2.html

http://example.com/en/news/articles/news-article-3.html

Is there any way we can achieve this without writing any custom code in AEM? I m not sure if Apache rewrite can achieve this.

Avatar

Correct answer by
Employee Advisor

Avatar

Level 1

Makes sense. Thanks JaideepBrar​ for the reference links.

Thanks,

Nikunj Jariwala