There is a checkbox in the domain mapping settings for running the dashboard under the original domain. Uncheck that box.
Ron, thanks for your reply.
I don’t agree that is the solution. Let me explain why.
In the network Domain Mapping options I have the “Redirect administration pages to site’s original domain (remote login disabled if this redirect is disabled)” option disabled.
In the site’s Domain Mapping settings, the primary domain is set as “domainx.com”, “domainx.domain.com” is listed unter the primary domain.
According to my logic, if we use the admin_url() function with these settings, this should return the admin url according to the setting of the primary domain in the site’s Domain Mapping settings, currently being “domainx.com”.
If I would enable the “Redirect administration …” option, I would expect admin_url() to return “domainx.domain.com”.
Can you please follow up? Thanks!
Are you referring to links on the front end of the site or in the dashboard?
Ron,
I believe it’s only in the dashboard, haven’t tested it on frontend. There’s a plugin that uses admin_url() to get the current admin url for authentication purposes. If this gets the wrong url, authentication is not possible.
Just for clarification – you are in the dashboard at http://domainx.com/wp-admin/ and are getting admin_urls http://domainx.domain.com/wp-admin/ ?
When you click on them what happens?
Ron,
when the url domainx.domain.com, this get rewritten dto domainx.com. But, since the authentication uses the non-rewritten url, the authentication fails. BTW it concerns a Facebook app authentication.
You can write a small plugin & use the admin_url filter to change it – http://wpseek.com/hook/admin_url/