Setting a custom logout page | Community
Skip to main content
Level 3
January 7, 2016
Solved

Setting a custom logout page

  • January 7, 2016
  • 2 replies
  • 1608 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

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]

2 replies

Sham_HC
Sham_HCAccepted solution
Level 10
January 7, 2016

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]

Gunars_VAuthor
Level 3
January 8, 2016

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?