Is it possible to redirect the URL only the first time?

Hi,

I’m trying to redirect an url (p.e. https://www.domain.com) to a certain directory inside that domain (https://www,domain.com/login/index.php) but only the first time the user access.

The apache server makes some internal redirection but it would get https://www,domain.com/login/index.php if this is set by the web browser, avoiding the too many redirects error.

I need this to occur only the first time one user logs in, because HAProxy is offloading SSL and asking for a client certificate that I need to rewrite on the url.

Thanks!!!