Index: domain.module =================================================================== --- domain.module (.../contrib/domain) (revision 3460) +++ domain.module (.../ncrv/domain) (working copy) @@ -56,8 +56,8 @@ // 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', FALSE) && !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 !url.', array('!url' => $request))); drupal_goto($request); Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo Index: domain_admin.inc =================================================================== --- domain_admin.inc (.../contrib/domain) (revision 3630) +++ domain_admin.inc (.../ncrv/domain) (working copy) @@ -277,6 +277,7 @@ 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. @@ -292,6 +293,13 @@ '#description' => t('When rewriting urls, nodes assigned to all affiliates will be sent to this domain.'), ); + $form['domain_advanced']['domain_redirect_wildcards'] = array( + '#type' => 'checkbox', + '#title' => t('Enable wildcard domain redirection'), + '#default_value' => variable_get('domain_redirect_wildcards', FALSE), + '#description' => t('With Domain Access, because of the 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 none-exising domains. However, in some cases you don not want this redirect to take place. For example when testing or developing on test.example.com, or your localhost.'), + ); + $form['domain_advanced']['domain_www'] = array( '#type' => 'radios', '#title' => t('WWW prefix handling'),