I have my wordpress blog at www.mysite.com , also I have my own php application at a subdomain l.mysite.com
I want the login credentials of WordPress in my PHP application. I figured out that by including the wp-blog-header.php from the root to my app.
I can use the user info OK.
I wanted to redirect users to www.mysite.com/wp-login.php?redirect_to=l.mysite.com . You can see here that I am specifying the redirect_to parameter. WordPress ignores this and redirects to admin panel.
I think that worpdress doesn’t allow redirect to an “external domain” , which I think is specified in wp_safe_redirect() function in wordpress. Is there any plugin which could ignore some domain to which redirect can happen?
I see that there are many login specific redirect plugins but none which could do to a new doamin.
Check this Plugin: http://www.theblog.ca/wplogin-redirect
Looks like it does what you want. Probably it’s outdated, however, it should be trivial to create a plugin that fits your need.
A filter to start with is
login_redirect, there is another filter inwp_safe_redirect()so you can prevent the domain you want to use being blocked.To monitor redirects, checkout my Better HTTP Redirects Plugin.