2
  • We have a LWR experience site that was created before winter'23, so /s prefix exists for most of our pages and our home page url is something like this: acme.customer.com/s/
  • We use Google as the auth. provider, so we don't need below out of box urls that platform creates. We tried deleting this but it is not possible(Don't remember the exact error).
    • acme.customer.com/s/ForgotPassword
    • acme.customer.com/s/CheckPasswordResetEmail
    • acme.customer.com/s/SelfRegister
    • acme.customer.com/s/login
  • If a user enters any of the above urls, we want to redirect user to below url:
    • acme.customer.com/services/auth/sso/google_sso_login

Options available:

Salesforce Sites URL Redirects

  • Below is what I tried but it is not working. Any url redirect rule that I add here that starts with prefix /s is ignored.

enter image description here

Redirect Users to Your Experience Builder Site Pages

  • I prepared csv file as per the documentation and uploaded but it is a relative url redirect. It is not able to remove /s prefix.

enter image description here

lightning-navigation

  • This is the only option that is working for now. We have a dummy component on all of these pages that redirects user to sso url using NavigationMixin. User experience isn't that great and there is a flickering effect.

Is there a better solution for my use case?

1 Answer 1

1

Figured it. We can use go up directory syntax(..) in Target URL field.

  1. Prepare a csv file using below:

    /acme/s/login,/../services/auth/sso/Google_SSO_Login,301
    
  2. Upload the csv file as per this article: https://help.salesforce.com/s/articleView?id=sf.networks_url_redirects.htm&type=5

With this setup all urls originating from <base-domain>/acme/s/login will be redireced to <base-domain>/acme/services/auth/sso/Google_SSO_Login

1
  • what on earth is the '301' in ur csv?
    – compski
    Commented Aug 20 at 9:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .