Wordpress: after the redirect the cookies disappear

0

I made a simple redirect with

wp_redirect(home_url());
exit();

And after that the cookies are clean (the session too), what could not happen, how to persist cookies after the redirect? From what I've seen seems to be the exit () problem, but without it the targeting does not happen.

Thank you.

    
asked by anonymous 05.09.2018 / 15:14

1 answer

0
The problem was that I had pages that were like localhost, and others with the local ip, so in those exchanges I was identified as different domains and wiped out the cookies and session variables. I have standardized the urls to use all the same ip ("domain") and the variables persisted as I browsed the pages.

    
05.09.2018 / 16:36