4

I need to prevent user from accessing standard community pages like /login and /sitelogin, because I have custom branded pages. In Salesforce SiteLogin.component there is no option for action (method that executes on page load), so maybe there is another way to do redirect? Javascript would be bad option because it is not safe.

  • 3
    You can use an action tag for example on the page SiteLogin, where the actual component is used on. Or implement the logic in the custom controller of the SiteLogin page. – Sergej Utko Apr 7 '16 at 11:07
  • @SergeyUtko There is no SiteLogin page available. I think Salesforce just allows to customize layout by giving access to component only. – Vladyslav K Apr 7 '16 at 11:10
  • 1
    It is not true. Once enabled (communities/site) you should get access either to CommunitiesLogin or SiteLogin that are default login pages created automatically by system. Try to search for it within dev console. – Sergej Utko Apr 7 '16 at 11:20
  • @SergeyUtko thanks, I solved problem with /sitelogin, but user can still type '/login' in url and go to default login page. I can create url redirect, but it does not work if I pass any url parameters to that page – Vladyslav K Apr 7 '16 at 11:59
2

There are several ways of handling your issue. One is simply by branding the standard community login page. Another is by modifying the Apex community and/or sites login Controller so that it redirects to your custom login page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.