WordPress.org

Ready to get started?Download WordPress

Forums

moving subdomain multisite with buddypress (2 posts)

  1. robcwright
    Member
    Posted 2 years ago #

    Well, the hard part is behind us, we have successfully moved a rather larger and over-complicated multi-site setup with buddypress. Now we've got the old domain that we need to redirect.

    We're doing a simple 301 redirect on the main site now, but I also want to map the subdomains to their new subdomains under the new domain.

    ie: sd1.olddomain.com should resolve to sb1.newdomain.com. Right now the regex is just catching the root domain and properly redirecting all traffic, including the subdomains, to the root of newdomain.

    I was thinking something like (.*).olddomain.com http://$1.newdomain.com would work but no such luck. Any regex/htaccess geniuses out there?

  2. RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).olddomain.com [NC]
    RewriteRule ^(.*/) http://{REQUEST_URI}.newdopmain.com/%1 [PT,L]

    Maybe? It seems right in my head, but I've not tested it...

Topic Closed

This topic has been closed to new replies.

About this Topic