In my wp multisite mysite.com, I want any login request to be sent to my custom login page at mysite.com/login.
I found this rewrite rule:
RewriteRule ^(.*)/login/$ http://mysite.com/login/ [L]
It works, but it does not send the user back to the previous page after login. The previous page could be on mysite.com or mysite.com/subsite1.
Thanks
Well, I built a multisite, mysite.com composed of mysite.com/subsite1, mysite.com/subsite2… and use Theme my Login plugin.
As I wanted all the login requests to be sent to mysite.com/login, I found a rewrite rule to acheive that:
Basically, after my readings and anderstanding, this
^(.*)/
will find any url with ‘login’ in mysite.com and subsites, and redirect it to mysite.com/login.Explaining the flags from: http://httpd.apache.org/docs/current/rewrite/flags.html:
The combination of those rules will send a user to mysite.com/login, then redirect them to the previous page after login.
I hope my explanation is helpful -;)