[Plugin: WordPress MU Domain Mapping] Wildcard domains
I just installed a clean version of WP 3.1 and domain mapping and it all works. However, I want to wildcard my domains. I set up wp on domain wp.domain.com and I added a new mapped domain example.com.
Righ now http://www.example.com redirects to example.com which is great. However, abc.example.com redirects to http://wp.domain.com/wp-signup.php?new=abc.example.com. I want abc.example.com, a.b.c.example.com, etc. to all redirect to example.com.
I think one solution is to edit sunrise.php to do a wildcard redirect at the lines:
if( ( $nowww = preg_replace( '|^www\.|', '', $dm_domain ) ) != $dm_domain ) $where = $wpdb->prepare( 'domain IN (%s,%s)', $dm_domain, $nowww ); else $where = $wpdb->prepare( 'domain = %s', $dm_domain );
Another possibility is to use RedirectMatch in httpd.config.
Another possibility is to put a redirect in .htaccess.
I am not sure what to do or what REGEX to use to accomplish this.
- The topic ‘[Plugin: WordPress MU Domain Mapping] Wildcard domains’ is closed to new replies.