psvolley
Member
Posted 15 years ago #
Is it possible to redirect the home page (root install) of wpmu to a subdomain blog? If so how?
My main reason for wanting to do this is to essentially hide the BuddyPress 1.1 theme from my home page. I only want to use a BP theme for the social layer, not take over the home page of the site.
Trying to think logically, this could be one way to do it, without trying to merge my buddypress and wordpress themes together.
Any advice would be greatly appreciated.
Thanks
Paul
Make a new theme with only and index.php and add the following code to it:
<?php
header( 'Location: http://sub.domain.com/' ) ;
?>
Make sure that is the only code in the file and that there is no white space before the <?php. And of course, change sub.domain.com to the address you want to forward to.
Activate BP on a second blog, not the main blog. Yes, you can do that. :D
addendum: If you do this, you may also need to define the BP_root in wp-config so it know where to redirect people.
psvolley
Member
Posted 15 years ago #
Thanks for the tips. I think I can use the BP theme on my Members Area Home page, so activating it there can work well.
re: defining the BP_root can you please advise on how and where to place this. I found the code:
define( 'BP_ROOT_BLOG', [blog ID of secondary blog here] );
but is there a specific place to put it in the wp-config file?
Thanks again for your help.
Paul
Nope, just dump it in there somewhere in the middle.
mattmaan
Member
Posted 14 years ago #
Thanks for the answers all!
NOTE: There is an extra ';' in STDestiny's redirect code.