[wp-hackers] Allow redirects to subdomain with multisite?

Michael D Adams mda at blogwaffe.com
Thu Aug 25 20:24:44 UTC 2011


On Thu, Aug 25, 2011 at 1:06 PM, Otto <otto at ottodestruct.com> wrote:
> On Thu, Aug 25, 2011 at 1:38 PM, John Reuning <john at ibiblio.org> wrote:
>> I have a multisite install with a single-sign on integration that only
>> works if the redirect destination from the sso server is the top-level
>> url.  i.e. sending the browser to https://example.com/wp-login.php
>> works but not https://site.example.com/wp-login.php.
>
> Regardless, wp_validate_redirect is a pluggable function. You don't
> have to edit the core code to modify it, just define the function
> elsewhere, like in a plugin, and your version will replace the one in
> the core.

You can also attach something to the allowed_redirect_hosts filter.
It doesn't have to add all your subdomains: just the one you're
redirecting to at the moment.

Mike
--mdawaffe


More information about the wp-hackers mailing list