summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-01-02 17:48:17 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-01-02 17:48:17 +0000
commit9f984852bd0f5ad05245ee3e2e2c6ed12ed010bf (patch)
treefc7c46af28b396df67dadee35ed87a49cdcc9dff
parent9c11318dcac459c2840d3e322966f275467d5ddb (diff)
downloadwordpress-mu-9f984852bd0f5ad05245ee3e2e2c6ed12ed010bf.tar.gz
wordpress-mu-9f984852bd0f5ad05245ee3e2e2c6ed12ed010bf.tar.xz
wordpress-mu-9f984852bd0f5ad05245ee3e2e2c6ed12ed010bf.zip
Added "NOBLOGREDIRECT" constant to redirect if a blog is unknown, fixes #522
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1178 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-config-sample.php5
-rw-r--r--wpmu-settings.php6
2 files changed, 10 insertions, 1 deletions
diff --git a/wp-config-sample.php b/wp-config-sample.php
index 302e1ec..90de36a 100644
--- a/wp-config-sample.php
+++ b/wp-config-sample.php
@@ -21,9 +21,14 @@ $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');
+
// uncomment this to enable wp-content/sunrise.php support
//define( 'SUNRISE', 'on' );
+// Uncomment and set this to a URL to redirect if a blog does not exist. (Useful if signup is disabled)
+// Browser will redirect to constant( 'NOBLOGREDICT' ) . "?new=blogname" where blogname is the unknown blog
+// define( 'NOBLOGREDIRECT', '' );
+
define( "WP_USE_MULTIPLE_DB", false );
/* That's all, stop editing! Happy blogging. */
diff --git a/wpmu-settings.php b/wpmu-settings.php
index bebcf00..a18e556 100644
--- a/wpmu-settings.php
+++ b/wpmu-settings.php
@@ -103,7 +103,11 @@ if( constant( 'VHOST' ) == 'yes' ) {
if( defined( "WP_INSTALLING" ) == false ) {
if( $current_site && $current_blog == null ) {
- header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) );
+ if( defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
+ header( "Location: " . constant( 'NOBLOGREDIRECT' ) . "?new=" . urlencode( $blogname ) );
+ } else {
+ header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) );
+ }
die();
}
if( $current_blog == false || $current_site == false )