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
venkatsforcevenkatsforce site LoginRedirect



     Am new to site development, when i using site login page at that time i give the logincredentials of the PartnerPortal user login details and then it moves to portal page, i want to redirect the page to site page instead of  portal page...As I use this url as https://partnerportalurl?username&password/apex/vfpage but i got the error as Unable to load the Visualforcepage.i dont know how to redirect..Is there any possibilities?







Hi Venkat,


What you can do here is customize the landing page for your Partner Portal and have your visualforce page setup as the landing page.


Follow the stpes in the doc below to get that setup:


Hope I've understood your requirement and the suggestn helps!




       Thanks for your reply @sonam_sfdc ,here am trying after the partner portal login will be succes it doesn't redirect to the particular visualforce page, it moves to AuthorizationRequired site standard login page...


i using the code as


public class PortalAccess {
    public String username {get; set;}
    public String password {get; set;}
    public PageReference login() {
        String startURL = '';
               startURL += '?orgId=00D90000000pw4Z&portalId=060900000005BmN&loginType=3';  
               startURL += '&startURL=&loginURL=&useSecure=true';
               startURL += '&un=' + username;
               startURL += '&pw='+ password;
               startURL += '?/apex/Loginpage1';               
               if(username!='' && password!='')
                   PageReference pg = new PageReference(startURL);
                   //String CurrentUrl =  System.currentPageReference().getParameters().get('startURL');
                   //PageReference p = Site.login(username,password,startURL);
                       return pg;
                       return pg;
        return null;



Is there any other possible way to write the controller class, to ridirect the portalpage to visualforce page after the login successfull.