Home Wp Login redirect strips parameters from url
Reply: 1

Wp Login redirect strips parameters from url

Nori Published in 2018-01-10 15:06:44Z

If i write http://example.com/wp-login.php?redirect_to=http://example.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat in the url address bar (to make the login page redirect to a specific page with parameters) and login.

I get redirected to the right page but only with first parameter (http://example.com/specificpage/?parameter1=dog). the other two parameters are stripped from the url.

How can i solve that?

Btw - the parameters are acceptable on this site (set in the functions file with add_custom_query_vars so that's not the problem).

Nori Reply to 2018-01-11 14:22:24Z

I ended up encoding the redirect url. using php in my case ('http://example.com/wp-login.php?redirect_to='.urlencode(http://example.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat));)

Now it works!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315701 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO