Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Setting a custom logout page

Avatar

Level 3

I'd like to have users go to a different page other than the root of our application when logging out.
I am following this post here: http://cqinnovator.blogspot.com/2014/07/how-to-change-default-page-after-sign.html

I have created this: /apps/myapp/config.publish/com.day.cq.commons.servlets.RootMappingServlet, and modified the "rootmapping.target" to point to the custom HTML page.

When viewing the page via Publish instance (directly via IP) it works, but when viewing the site via Dispatcher, it goes back to the root. As far as I understand, we have a simple Author-Publish-Dispatcher configuration.

Has anyone experienced this before?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Even if you allow route access in dispatcher will unnecessarily make a load on publisher.  Please have a rewrite rule[1] in dispatcher to land user on home page to get benefit of caching & solving at web server level.

 

[1] RewriteRule ^(/)$ /your/homepagepath.html [R]

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Even if you allow route access in dispatcher will unnecessarily make a load on publisher.  Please have a rewrite rule[1] in dispatcher to land user on home page to get benefit of caching & solving at web server level.

 

[1] RewriteRule ^(/)$ /your/homepagepath.html [R]

Avatar

Level 3

Thanks Sham HC. If I were to add another application on the same server down the road, wouldn't that impact that? I'm assuming if you add a rewrite rule on the server, it would direct all logouts to that page. Correct? Is there a way to specify per application?