? 300454-domain-url.patch
? 321071-settings.patch
? 32107_wildcard_dns_redirect_settings_02.patch
? 336221-domain-content.patch
? 336221-domain_content_url_encoding.patch
? domain_prefix/domain_prefix.path.inc
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/README.txt,v
retrieving revision 1.26.2.14
diff -u -p -r1.26.2.14 README.txt
--- README.txt	10 Oct 2008 18:25:55 -0000	1.26.2.14
+++ README.txt	28 Jun 2009 20:20:50 -0000
@@ -51,6 +51,8 @@ CONTENTS
 4.3.4   Default Source Domain
 4.3.5   WWW Prefix Handling
 4.3.6   Node Access Settings
+4.3.7   Wildcard Redirection
+4.3.8   Redirect Notification
 4.4   Special Page Requests
 4.4.1   Cron Handling
 4.5   Node Link Patterns
@@ -735,7 +737,6 @@ required IF:
   -- You want to strictly enforce access permissions by requiring
   both Domain Access and your other module to grant permission.
 
-
 By design, the node access system in Drupal 5 is a permissive system.
 That is, if you are using multiple node access modules, the permissions
 are checked using an OR syntax.
@@ -763,6 +764,38 @@ Enabling this feature requires the multi
 in 2.1.1.
 
 ----
+4.3.7   Wildcard Redirection
+
+When using Domain Access with wildcard DNS, an invalid domain (e.g. a
+misspelling) results in an alias of the default domain rather than a redirect.
+In general you will want to issue a redirect, to avoid spiders indexing wrong
+domains, or people making bookmarks to non-existant domains. However, in some
+cases you do not want this redirect to take place. For example when testing or
+developing on test.example.com, or your localhost.
+
+Check the box if you wish to redirect invalid domain requests to the default
+domain. Note that an "invalid" request is a domain that is recognized by your
+web server (like foo.example.com) but not registered with Domain Access.
+
+By default this behavior is turned on.
+
+NOTE: This behavior is deprecated in Drupal 6 in favor of the Domain alias
+module.
+
+----
+4.3.8   Redirect Notification
+
+If issuing a redirect from an invalid domain, print a message to the screen
+telling the use that they following an outdated link. This is useful for cases
+where you have migrated a site or its content onto Domain Access.
+
+By default this behavior is turned on. It will not appear if Wildcard
+Redirection is not enabled.
+
+NOTE: This behavior is deprecated in Drupal 6 in favor of the Domain alias
+module.
+
+----
 4.4   Special Page Requests
 
 For this feature to work, you must follow the instructions in INSTALL.txt
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.40.2.31
diff -u -p -r1.40.2.31 domain.module
--- domain.module	28 Jun 2009 15:43:29 -0000	1.40.2.31
+++ domain.module	28 Jun 2009 20:20:52 -0000
@@ -56,10 +56,13 @@ function domain_init() {
   // If return is -1, then the DNS didn't match anything, so use defaults.
   if ($_domain == -1) {
     $_domain = domain_default();
-    // If the request was not for the primary domain, send the user there.  See http://drupal.org/node/293453.
-    if (!empty($_domain['subdomain']) && $_subdomain != $_domain['subdomain']) {
+    // If the request was not for the primary domain, send the user there.
+    // See http://drupal.org/node/293453 and http://drupal.org/node/321071.
+    if (variable_get('domain_redirect_wildcards', TRUE) && !empty($_domain['subdomain']) && $_subdomain != $_domain['subdomain']) {
       $request = domain_get_uri($_domain);
-      drupal_set_message(t('You have followed an incorrect link to this website.  Please update your links and bookmarks to <a href="!url">!url</a>.', array('!url' => $request)));
+      if (variable_get('domain_redirect_alert', TRUE)) {
+        drupal_set_message(t('You have followed an incorrect link to this website.  Please update your links and bookmarks to <a href="!url">!url</a>.', array('!url' => $request)));
+      }
       drupal_goto($request);
     }
   }
Index: domain_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/Attic/domain_admin.inc,v
retrieving revision 1.29.2.11
diff -u -p -r1.29.2.11 domain_admin.inc
--- domain_admin.inc	11 Sep 2008 13:35:21 -0000	1.29.2.11
+++ domain_admin.inc	28 Jun 2009 20:20:53 -0000
@@ -277,6 +277,7 @@ function domain_configure_form($user_sub
       This feature requires the hook_url_alter() patch.')
   );
 
+
   $options = array('-1' => t('Do not change domain'));
   foreach (domain_domains() as $data) {
     // The domain must be valid.
@@ -300,6 +301,20 @@ function domain_configure_form($user_sub
     '#description' => t('If set, calls to www.* will be treated as if the www. did not exist.')
   );
 
+  $form['domain_advanced']['domain_redirect_wildcards'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable wildcard domain redirection'),
+    '#default_value' => variable_get('domain_redirect_wildcards', TRUE),
+    '#description' => t('When using Domain Access with wildcard DNS, an invalid domain (e.g. a misspelling) results in an alias of the default domain rather than a redirect. In general you will want to issue a redirect, to avoid spiders indexing wrong domains, or people making bookmarks to non-existant domains. However, in some cases you do not want this redirect to take place. For example when testing or developing on test.example.com, or your localhost.'),
+  );
+
+  $form['domain_advanced']['domain_redirect_alert'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Notify user of wildcard redirection'),
+    '#default_value' => variable_get('domain_redirect_alert', TRUE),
+    '#description' => t('If redirecting invalid domains to the primary domain, print a message to the user, telling them to update any page bookmarks.'),
+  );
+
   $form['domain_all'] = array(
     '#type' => 'fieldset',
     '#title' => t('Special page requests'),
