Print this page

Why is startURL parameter not redirecting in Site?

Knowledge Article Number 000181527
Description Scenario-
User created a site, say "".
This is also used by customer portal users.
If Salesforce user sends a link to a KB article to a customer portal user say "", it redirects to home.jsp or something else other than the KB article explicitly mentioned in the URL.
Resolution 1) Need to check the SiteLoginController apex class.
This is standard apex class used in login.

2) In the login() method, make sure that the startURL parameter is set as follows-
String startUrl = System.currentPageReference().getParameters().get('startURL');
return Site.login(username, password, startUrl);

3)If the startURL parameter has been set to something else, then you will not be able to use it in the given scenario. 

promote demote