Dear All,
I have below requirement to redirect my website to home pages and these home pages should be authorable for AEM cloud
For Example,
I have one site called www.sunita.com/en...So my requirement is if I will hit www.sunita.com/en then it will redirect to www.sunita.com/home.html
and next day when I will hit www.sunita.com/en it will redirect to www.sunita.com/home1.html and so on.
So that lets say the author creates
sunita.com/en/home.html
sunita.com/en/home1.html
sunita.com/en/home2.html
then on Monday I set the property in content/sunita/en page to be home.html but on Tuesday I decide to go live with the home1.html , so all I need to do is switch the property in the content/sunita/en page to point to home1.html
Can anybody put some lights how can I achieve this ?
Thanks,
Sonu
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @sunitaBorn
For your scenario easiest solution would be to use redirectTarget property as it will give control to authors.However in this case redirect is handled by publishers so this enables additional traffic to publisher servers.
To avoid this you need to use Apache rewrite which will use AEM authored redirects. To achieve this one solution could be to maintain text file which contains all redirect url on dispatcher and you can update this file on page activation (same as VanityUrl's handling) or with help of scheduler.
And this is how you can use this text file in your rewrite rules
RewriteMap test "txt:/mnt/var/www/html/YOUR TXT FILE.txt"
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond ${test:%1} >""
RewriteRule ^(.*)$ ${test:$1} [R=302,L]
Hope this helps.
Thanks
Dipti Chauhan
Hi @sunitaBorn ,
These type of redirects are typically handled in apache. Something like below
Views
Replies
Total Likes
Hi @sunitaBorn,
Please refer to below article, it mentions various options for custom redirects - https://medium.com/tech-learnings/adobe-experience-manager-aem-implementing-custom-redirect-vanity-u...
Also, if this is something you want to test temporarily, you can achieve this through Target as well -
https://experienceleague.adobe.com/docs/target/using/experiences/vec/redirect-offer.html?lang=en
Views
Replies
Total Likes
Hello @sunitaBorn ,
We've cq:redirect property, you can add this property under jcr:content node for source page.
cq:redirectTarget: <redirect_page_path>
@sunitaBorn You can achieve this with clientcontext personalization. You would day of the week as segment/ audience to configure a specific page on a specific day.
http://www.sgaemsolutions.com/2018/12/personalization-using-contexthub-in-aem.html
Other solution could be to leverage Redirect Map Manager
https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-map-manager/index.html
Hi @sunitaBorn
For your scenario easiest solution would be to use redirectTarget property as it will give control to authors.However in this case redirect is handled by publishers so this enables additional traffic to publisher servers.
To avoid this you need to use Apache rewrite which will use AEM authored redirects. To achieve this one solution could be to maintain text file which contains all redirect url on dispatcher and you can update this file on page activation (same as VanityUrl's handling) or with help of scheduler.
And this is how you can use this text file in your rewrite rules
RewriteMap test "txt:/mnt/var/www/html/YOUR TXT FILE.txt"
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond ${test:%1} >""
RewriteRule ^(.*)$ ${test:$1} [R=302,L]
Hope this helps.
Thanks
Dipti Chauhan
Views
Likes
Replies