[wp-hackers] Disabling wp-signup redirections in WP 3.0.1 inmultisite mode
David Morris
dvmorris at gmail.com
Mon Sep 20 03:14:52 UTC 2010
Thanks for the suggestion. I'm not sure that's going to work for me, because
I'm not in sub-domain mode, and I am actually not trying to disable
redirects from invalid blog URLs. Say I have a WP 3.0 Multisite installation
at:
http://blog.example.com/
And I have a sub-blog at:
http://blog.example.com/blog2
If I'm on blog2, and I go to the wp-login page, the URL is:
http://blog.example.com/blog2/wp-login.php
The link that says Register points here:
http://blog.example.com/blog2/wp-login.php?action=register
which redirects to:
http://blog.example.com/blog2/wp-signup.php
which then immediately redirects to:
http://blog.example.com/wp-signup.php
I would like to remove that last redirect, and the only way I can figure out
how to do it is by commenting out these lines starting on line 30 of
wp-signup.php:
/*if ( !is_main_site() ) {
wp_redirect( network_home_url( 'wp-signup.php' ) );
die();
}*/
I did figure out how to hook wp_redirect and disable that particular
redirect, but the die() statement above was still killing me. It seems like
the wp_redirect should be wrapped in a conditional, and the page should only
die if the redirect actually happened.
Dave
On Sat, Sep 18, 2010 at 12:01 PM, Philip M. Hofer (Frumph) <
philip at frumph.net> wrote:
>
> http://frumph.net/wordpress/wordpress-3-0-multisite-subdomain-installation-noblogredirect-behavior-fix/
>
> This will do it for you. If i'm reading what you want to do correctly.
>
> ----- Original Message ----- From: "David Morris" <dvmorris at gmail.com>
> To: <wp-hackers at lists.automattic.com>
> Sent: Saturday, September 18, 2010 8:22 AM
> Subject: [wp-hackers] Disabling wp-signup redirections in WP 3.0.1
> inmultisite mode
>
>
> I would like to disable the redirect in wp-signup.php that always
>> takes you back to the root blog's signup page (when running in
>> multisite mode).
>>
>> The code that does this redirect is on line 26 of wp-signup.php:
>>
>> if ( !is_main_site() ) {
>> wp_redirect( network_home_url( 'wp-signup.php' ) );
>> die();
>> }
>>
>> Is this hookable in a generic way? I see the wp_redirect filter in
>> pluggable.php:877:
>>
>> $location = apply_filters('wp_redirect', $location, $status);
>>
>> But I'm just wondering if there is a generic way to only affect the
>> wp-signup redirections and be sure that it won't affect any other
>> functionality.
>>
>> Thanks for your help,
>>
>>
>>
>> --
>> Dave Morris
>> http://dave.showviz.net/
>> http://3dcamphouston.com/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Dave Morris
http://dave.showviz.net/
http://3dcamphouston.com/
More information about the wp-hackers
mailing list