Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Best practices to rewrite urls with AEM

Avatar

Level 10

Background: In one of the implementations, we have a reverse proxy in front of AEM setup & following microservices based architecture and a hybrid content delivery model.

The requirements are to manipulate both inbound & outbound urls for architectural (& SEO) reasons. Broadly, it can be categorized into two buckets:

  1. Manipulate the urls within AEM
  2. Manipulate the urls outside AEM meaning mounting a specific pattern on AEM root to simplify routing between AEM & non-AEM apps

I've seen various implementations within & outside AEM using resolver, etc-map, Transformers, ACS-Commons, bespoke solutions, apache, nginx etc. but there are pros/cons to each depending on the end-goal. 

 

I'd love to hear from the SMEs about the best practices or maybe pitfalls to avoid in general (or AEMaaCS specifically) that could potentially become a bottleneck down the line.

 

Thanks in advance!

 

CC: @Jörg_Hoh @tadreeves 

1 Reply

Avatar

Community Advisor

Hi Gaurav,

 

Great discussion.

 

There's no one rule fit's all here. It all depends on the use case and tech stack you have.

 

Preparing right url's upfront in AEM is a great beginning, to avoid any redirects in first place.

 

Routing to correct url's via Apache is a solid way to go on from here.

 

Where Apache lack's functionality or get's too complex, CDN / Varnish / NGinX will help.

 

Once these are in place, redirects will be needed as project life goes on, they can be offloaded to the most appropriate layer.

 

Generally for few redirects with minimal traffic Publishers are good, once we start hitting thresholds might be good idea to move to CDN or Apache.

 

Regards,

Peter