The MU forums have moved to WordPress.org

404 redirects to wp-signup.php (11 posts)

  1. chris
    Member
    Posted 15 years ago #

    When I get a 404, I'm redirected to the signup page. Like domain.com/404/ redirects to domain.com/wp-signup.php?new=404. Is this a normal behavior? If not, how can I fix it? If it is normal, how can I change it?

  2. andrea_r
    Moderator
    Posted 15 years ago #

    It's the default behaviour. Not sure where you'd go to change it. I'm sure another guru will stumble along ... ;)

  3. nexia
    Member
    Posted 15 years ago #

    this is the permalink system that have some "leaks"... when the url is not recognised, it redirect to the signup page... have to be fixed, because sometimes it's hilarious

  4. zeug
    Member
    Posted 15 years ago #

    In rc4 the error redirect is in line 87 of wpmu-settings.php:

    header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) );

    I needed this to point to an error page so I just changed wp-signup.php?new= to error.php ... seems to work ok although you should include

    <?php header( "HTTP/1.0 404 Not Found" ); ?>

    at the top of your error.php to make sure the page returns an error, especially for things like google bot.

  5. zeug
    Member
    Posted 15 years ago #

    By the way, the above is just a hack as the response header returns 404 for error.php rather than the page called, better than nothing tho. Anyone know where the default WP error is diverted in Mu?

  6. mozey
    Member
    Posted 15 years ago #

    hehe, well, i guess i'm not the only one having this issue.

    mydomain.bla/forums is being redirected to the signup page!. Any hacks that might help me?.

  7. andrea_r
    Moderator
    Posted 15 years ago #

    Have you declared mydomain.bla/forums to be a valid URL before the virtual one in Apache and/or htacess?

  8. mozey
    Member
    Posted 15 years ago #

    Andrea_r i'm not sure who to do that. but i will find out.

  9. zeug
    Member
    Posted 15 years ago #

    If mydomain.bla/forums is a valid directory then it shouldn't return a 404 not found and get passed to signup.php. I have a heap of non-mu directories in a couple of rc4 mu installs (subdomain and subdirectory) and no need to declare any of them.

    If /forums is a virtual directory then maybe you need something like ^forums(.*) http://mydomain.bla/forums in your mu's htaccess rewrites. Just guessing but maybe worth a try.

  10. mozey
    Member
    Posted 15 years ago #

    well, /forums in an actual directory, however, it contains BBpress, and i added these two lines at the bottom of my bb-config.php (its actaully called config.php).

    define('WP_BB', true);
    require_once( dirname(__FILE__) . '../wp-config.php');

    its suppose to load wp functions which will be used to share sessions and other sync stuff.

    so mu and bb work properly if i commented them out. but i need it there for future use.

  11. chris
    Member
    Posted 15 years ago #

    I tried redirecting to a 404.php using zeug's idea and all it did was put this in the url when going to "http://domain.com/blah": http://domain.com/404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.php404.phpblah

About this Topic