# Logout redirected with default contextpath

**URL:** <https://community.bloomreach.com/t/logout-redirected-with-default-contextpath/3247>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [June 24, 2022, 7:45am UTC](https://community.bloomreach.com/t/logout-redirected-with-default-contextpath/3247 "2022-06-24T07:45:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnanamoorthi](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gnanamoorthi](https://community.bloomreach.com/u/gnanamoorthi)\
**Post date:** [June 24, 2022, 7:45am UTC](https://community.bloomreach.com/t/logout-redirected-with-default-contextpath/3247/1 "2022-06-24T07:45:06Z")

</div>

Hi Team,

While redirect users after logout to home url (/), default context path was appended and redirected to wrong url (/site) and page was landed to page not found.

In console also, we have hst:showcontextpath flag as false.

this was the log we got before redirection:

[org.springframework.security.web.DefaultRedirectStrategy.sendRedirect():54] Redirecting to ‘/’

Thanks,  
Gnanamoorthi

---

<div class="post-metadata">

**Author:** ![machak](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/machak/32/1298_2.png) [@machak](https://community.bloomreach.com/u/machak)\
**Post date:** [June 24, 2022, 1:16pm UTC](https://community.bloomreach.com/t/logout-redirected-with-default-contextpath/3247/2 "2022-06-24T13:16:10Z")

</div>

spring itself doesn’t know about your proxy/context stripping, so you need to make that configurable.  
Some of the spring security implementations already have support for this (see for example _SAMLContextProviderLB_ at:  
[https://docs.spring.io/spring-security-saml/docs/current/reference/html/configuration-advanced.html](https://docs.spring.io/spring-security-saml/docs/current/reference/html/configuration-advanced.html)  
some of them not so you need to come up with your own solution.
