How to redirect free plan users to upgrade page instead of default access denied URL and hide pages from all users? Answered
I am new here and I have a question. When my "Free Plan" users try to access the "Paid Plan" content, how can I redirect them to a different URL than the default access denied URL? In this case, I want "Free Plan" users to go to an "Upgrade" page and non-users to go to the "Join" page(the default access denied URL). I hope my question makes sense.
Comments
6 comments
There are two different ways you can achieve this:
Option 1: Set the access denied page for the Paid Plan to the URL of the Upgrade Plan page and then, create another gated content for the Upgrade Plan page and this time, set the access denied URL to the Join page. This way, if non-users try to access the Paid plan page, they get redirected to the Upgrade page which instantly redirects them to the Join Page, on the other hand, if Free plan users try to access the paid plan page, then only end up on the Upgrade plan page.
Option 2: Delete the gated content setup you have for the page Paid Plan content, as well as the gated content data-ms-content attribute you have on the paid plan page, so as to avoid conflicts, then place the code below before the closing </body> section of the paid plan content page.
I guess the Option1 is the more sensible solution to go for.
Thanks it works perfectly. Big thanks for the help.
New question, is there a way to gate a page from both paid and free users. I want to hide the /join page from both of them.
Your setup would look like this:
Will it prevent the paid users too?
So sorry I missed that 🤦, please ignore my previous response.
In that case, you just need to place the code below before the closing </body> section of the Join page. What this code does is redirect members who try to access the Join page to the URL you set here
You seem to have answer to everything haha 😀. Thank you.
It works thank you man you saved the day!
Please sign in to leave a comment.