-
Good day! In version 1.45 new function. “?redirect_to=custom_url on login pages to take user to page after login (overrides other redirection options)” On my website it not work. I get 404 error. Someone tested it?
Try updating to the latest version first. It’s located here
Tryed 1.5.1 but no luck. I have links like that: http://example.com/example/wp-login.php?login=333333&redirect_to=http%3A%2F%2example.com%2Fpage%2F
And after click on link i redirected to login page but after login no redirect to page where i was click on link. Why?Have you tried going to Permalinks and re-saving the permalinks. I have had issues with 404 after making changes, and doing that refreshes the rewrite rules and those errors usually clear up.
This solution is also recommended by WordPress when working with redirects, because rewrite rules and redirects sometimes need to be refreshed when these kind of changes are made.
Let me know if this works. 🙂
That’s not a correct example. The correct example is that redirect_to must be passed along to a DIRECT page that has login shortcode. example:
http://localhost/profile/login/?redirect_to=http://google.com
I just tested it and it sent me to google.com after login.
You can try to visit this demo site /login/ page and pasing a redirect_to a custom URL, it should work on login. But http://example.com/example/wp-login.php?login=333333&redirect_to=http%3A%2F%2example.com%2Fpage%2F does not look like a valid login page. wp-login.php ? should not that be login/ or the login slug for userpro.
Ahmed its redirect from native wp comments form when we not logged in. Your plugin makes redirect to login page but without redirect. I can show you in google chat
Please read my answer again. 🙂 It should redirect_to on native login page by userpro
Brrrrr Ahmed you think i am so nooby? Its redirect to login userpro login page but without redirect_to.
Hi @alex1,
Then maybe it might be a good idea for you to clearly state exactly what you are trying to do. Are you trying to stay on the comments page after log in? Where exactly are you wanting redirect to take you? You haven’t clearly stated that. How can someone guess what you are trying to do?
Yes you are right. I have native post page and comments on it. If i am not logged in i have a link “You must be login to publish a comment” I need to stay on the comments page after log in
All global options must be rewrite by ?redirect_to. But yes i have refresh page only
I understand you alex1 now. I am currently looking for a work around now, so you want wp-login.php to also redirect and pass the redirect_to to userpro login page correct?
The topic ‘[Resolved] Redirect_to’ is closed to new replies.