Hello,
I have a following issue:
I'm trying to use clean urls, e.g. if my language is english - login url should be http://my.domain.com/en/login, if french - http://my.domain.com/fr/login. how can i configure spring security to use dynamic urls based on the selected language when user is trying to access restricted resource.
e.g. if I access this page: http://my.domain.com/en/login, do authentification and want to be redirected on http://my.domain.com/en/welcome , if i access http://my.domain.com/fr/login i want to be redirected to http://my.domain.com/fr/welcome
my configuration looks like:
Also if i access http://my.domain.com/fr/welcome and i'm not authenticated i would like to be redirected to http://my.domain.com/fr/loginCode:<http use-expressions="true" path-type="regex"> <intercept-url pattern="\A/[a-z]{2,2}/login\Z" access='isAnonymous()' /> <intercept-url pattern="/" access='isAnonymous()' /> <intercept-url pattern='/**' access='isAuthenticated()' /> <form-login login-page="/login" authentication-failure-url="/login" default-target-url="/welcome" /> <logout logout-url="/logout" logout-success-url="/" /> </http>
Thanks in advance


Reply With Quote