Wordpress redirection - login cookie error
<p>I have a wordpress installation at www.example.com
I have a new domain (www.promo-example.com) which is redirected to www.example.com/promo (but keeps the url www.promo-example.com)</p>

<p>There is a login box with a form which is submitted with ajax and if the login is successfull, redirects with javascript to a page (www.example.com/only-for-users) which is visible only for logged in users. From the original domain, wordpress sets the correct cookies, and everything works good.
BUT from the new domain, it does not set any cookies. Thus the login is successfull, the JS gets the success trigger and redirects to that page, but there the <code>is_user_logged_in()</code> returns false and sends it back to a separate login page.</p>

<p>Is there a way to set somehow the cookies, or what workaround can be for this problem? What I saw is that on www.promo-example.com there is no wordpress cookies set, but on the original one, it sets the default settings cookies.</p>