Forum Discussion

Suchith's avatar
6 years ago

Redirect User to Custom Page instead of Access Denied

 Hi,

I have a requirement, I have to show user a custom page or message when they try to access any category which they do not have permission. Please let me know is it possible to redirect to custom page or update Access Denied message.

Thanks,

  • Suchith,

    Page redirection will not work on error or access denied permissions pages. Beacuse they are already redirected on these errors.

    You can also do this by using JavaScript or jQuery to redirect users on custom page you want.

     

     

    • Suchith's avatar
      Suchith
      Ace

      Parshant

      Can you please let me know how can we achieve this using JavaScript or JQuery? and also is it possible to change the language (Message) of Error and Access Denied page?

      Thanks

      • Fellsteruk's avatar
        Fellsteruk
        Boss

        Yeah a redirect won’t work because the url for the error isn’t unique it’s actually the same as what a user would get if they had access, just they see content. 

        Im no developer so sure there is some magic you can do but to answer your other point the text, I’m guessing this: 

         can be updated in studio, you just need to locate the text key for the above this is done  by searching for the copy itself so “you do not have...” and it should show you the text key being used then you just copy edit the wording and paste it into the edits box below and save and it will update straight away on stage. Once happy with new copy do a push to production.