function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nrrhcnrrhc 

Redirect to new Customer Community login page

We are in the process of merging an instance into another instance.  The old instance uses customer communities and I would like to setup a URL redirect, so when customers go to the old url for the customer community it redirects them to the new customer community link for the new instance.  Is that possible?

I tried the URL redirect under Sites for the community, but it does not work.  It seems that is for pages within the community. 

Thanks in advance for any help
Gaurav NirwalGaurav Nirwal
Make VF login page like:

 

<apex:page id="loginPage" controller="CommunitiesLoginController" action="{!forwardToAuthPage}" title="{!$Label.site.site_login}">
</apex:page>

 

And controller like:

global with sharing class CommunitiesLoginController {

    global CommunitiesLoginController () {}
    
    // Code we will invoke on page load.
    global PageReference forwardToAuthPage() {
        String startUrl = System.currentPageReference().getParameters().get('startURL');
        return Network.forwardToAuthPage(startUrl);
    }
    
    @IsTest(SeeAllData=true)
    global static void testCommunitiesLoginController () {
        CommunitiesLoginController controller = new CommunitiesLoginController ();
        System.assertEquals(controller.forwardToAuthPage(),null);                           
    }    
}