Changeset 1178

Show
Ignore:
Timestamp:
01/02/08 17:48:17 (1 year ago)
Author:
donncha
Message:

Added "NOBLOGREDIRECT" constant to redirect if a blog is unknown, fixes #522

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-config-sample.php

    r1069 r1178  
    2222// to enable German language support. 
    2323define ('WPLANG', ''); 
     24 
    2425// uncomment this to enable wp-content/sunrise.php support 
    2526//define( 'SUNRISE', 'on' ); 
     27 
     28// Uncomment and set this to a URL to redirect if a blog does not exist. (Useful if signup is disabled) 
     29// Browser will redirect to constant( 'NOBLOGREDICT' ) . "?new=blogname" where blogname is the unknown blog 
     30// define( 'NOBLOGREDIRECT', '' ); 
    2631 
    2732define( "WP_USE_MULTIPLE_DB", false ); 
  • trunk/wpmu-settings.php

    r1177 r1178  
    104104if( defined( "WP_INSTALLING" ) == false ) { 
    105105        if( $current_site && $current_blog == null ) { 
    106                 header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) ); 
     106                if( defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) { 
     107                        header( "Location: " . constant( 'NOBLOGREDIRECT' ) . "?new=" . urlencode( $blogname ) ); 
     108                } else { 
     109                        header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) ); 
     110                } 
    107111                die(); 
    108112        }