Closed mattheu closed 6 years ago
@joe - i'm assigning this to you as I don't have a number 2 on this repo - and I know you did the nginx config stuff for HM Base. No rush ;)
Bump @joehoyle
I think this might be happening because we have something misconfigured somewhere. I get the feeling we shouldn't need a code fix for something WordPress should support out of the box, so I am reluctant to merge this. I'll have a bash at finding what the root cause it here if we don't know that
So, the reason this arrises is because we support mapping wp-admin
to wordpress/wp-admin
rather than redirecting, because that's how multisite with WordPress in a subdir works. However, this has the side effect that /wp-admin/
works on a single install, but the single install is actually configured with the site_url
at /wordpress
. This means this is "expected", you can always avoid the weird redirect by going directly to wordpress/wp-admin
rather than waiting for the redirect. In which case, on multisite this patch will break things as get_admin_url
will return /wp-admin
so an infinite redirect will happen.
@mattheu can you do a comparison also, so if ( '/wp-admin/' === $current_url && get_admin_url() !== $current_url )
or something like that?
Is this likely to be able to be fixed? It's basically affecting all our sites and is a pain.
Especially for clients who aren't going to realise how to work around it.
Would be nice to fix, as clients often contact us complaining that they're unable to log in. Had that a lot with Yell
@pdewouters @mattheu see https://github.com/humanmade/Salty-WordPress/pull/132 - we have one configuration for subdomain multisite and another for subfolder, this normalises that and fixed the problem for me at least in that situation.
Ah yes I applied that for working on the ADoR site.
Bump!
Closing this, please reopen if it's still relevant!
I have an issue where I go to
site.dev/wp-admin
and get redirected tosite.dev/wordpress/wp-admin
which is great... except thatreauth=1
gets appended to the url. Which causes a logout as soon as I try and log in.We should probably be handleing this at the level that the redirect is happening - but I can't for the life of me work out where this is...
I noticed Joel was experiencing this issue too - although he had got pretty used to it and always remembered to remove the query args from the url.