We're builfing multi country/language sites. On one of the page templates, under initial page properties / Advanced, we set Redirect property to us/english site, for example, /content/site/us/en/homepage.
When creating page for another country / language using that template we would like redirect property to be dynamically changed to context of that country/lang, for example, /content/site/be/fr/homepage.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Example rules :
RewriteRule ^/content/site/us/en.html$ /content/site/us/en/homepage.html [PT,NE,L]
RewriteRule ^/content/site/be/fr.html$ /content/site/be/fr/homepage.html [PT,NE,L]
Views
Replies
Total Likes
Hi,
We can achieve this using event listener when jcr:content node is created/updated event can be triggered
Ex: https://aemhints.com/2020/11/08/event-listener-in-aem-6-5/
Thank you,
I was thinking about that but I'm not sure if my use case applies to rewrite on dispatcher level.
For example, if on the dispatcher I got request to redirect to default redirect path which is set on the template level "/content/site/us/en/homepage"
1. Dispatcher gets url "/content/site/us/en/homepage"
2. On the dispatcher I need to determine what's my current country/lang site, for example "/be/fr/", is that possible ?
3. I need to extract "be/fr" from current context.
4. Replace, "us/en" with "be/fr"
I'm not sure If got this correct.
Example rules :
RewriteRule ^/content/site/us/en.html$ /content/site/us/en/homepage.html [PT,NE,L]
RewriteRule ^/content/site/be/fr.html$ /content/site/be/fr/homepage.html [PT,NE,L]
Views
Replies
Total Likes
Hi,
set this redirect at apache/dispatcher level, no need to process a page for just redirect and make a load on publish instance.
Hi Arun,
can you check my answer above (wrongly posted to different thread)
Views
Replies
Total Likes
Add redirects at dispatcher level .
Views
Likes
Replies