1

I have a Napili Customer Community in my Sandbox. Its built with custom Themes/Layouts and Lightning Components.

If Im logged in, and close my laptop - When I open it back up, its on Salesforce.com and the 'back' button shows it was redirected there by a ec 301.

enter image description here

I was guided to Site.com 'Site Configuration > URL Redirects', which is confusing enough, because I have only used the Community Builder so far.

enter image description here

  1. I dont know what goes in the 'Redirected From' field
  2. Im not sure I know why ec301 is occuring
  3. Is there anything I can do in Javascript to make sure any error codes or logouts go back to the Login page?

Any insight?

1

You need to use relative paths in the fields, Ex. from page A to page B, you can read more on redirect rules for site.com here

the error code simply indicates that the page to which you should have been redirected no longer exists.

The HTTP response status code 301 Moved Permanently is used for permanent URL redirection

According to the documentation

You can also redirect to your own page...

Create a file such as ieRedirect.js and include it in the header script section of the Site.com page. The file should contain the following code:

if (window.attachEvent && !window.addEventListener) {
window.location = '<your redirect page>';
}
  • Thank you for the bit of code, that may be the best path. As far as the error code, I guess thats whats confusing me - " error code simply indicates that the page to which you should have been redirected no longer exists." -> It should be logging out with a timeout and going to the login page, so Im not sure where its trying to go. Hopefully the javascript will be a catchall. – ATA1k May 4 '17 at 4:24
  • The big help for me here, was that you linked the Salesforce documentation containing the script, so I feel its not too hack-ish. Im familiar with that document, but never saw that bit of code. Thank you! – ATA1k May 4 '17 at 12:27
  • no prob, glad it was of help – glls May 4 '17 at 14:46

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.