Redirecting login Page if not logged in

Hi There,

I have been struggling with this issue I am not sure what I could be doing wrong, I have literally went through all the possible solutions below that are similar to my issue, Plllllease help.:sneezing_face:

This is the main page
https://www.savannahsa.com/public-documents/energy-generation/hartebeest-wind-energy-facility/

at the very bottom it has a “test Download page” for that project that should take it to the following “protected page” where the person can then download the file : http://dev.manticore.co.za/savannahsa/downloads/energy-generation/hartebeest-wind-energy-farm/ (this is the protected page)

But for some reason a person can only get redirected to the actual page once logged in, If they not logged in & they click on the “test Download page” it takes them to http://dev.manticore.co.za/savannahsa/login/?_s2member_vars=page..level..0..page..12629..L3NhdmFubmFoc2EvZG93bmxvYWRzL2VuZXJneS1nZW5lcmF0aW9uL2hhcnRlYmVlc3Qtd2luZC1lbmVyZ3ktZmFybS8%3D&_s2member_sig=1592896309-880e344ee4e55ea19657449d19c0eda5

These are the articles I tried

  1. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  2. Redirect to previous page after login not working
  3. Disable redirect to membership sign-up
  4. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  5. https://s2member.com/kb-article/customizing-your-login-welcome-page/

I would sincerely appreciate any help or pointing in the right direction Please :slightly_smiling_face:

S2member only protects content for people who are logged in. The software needs to know who you are to know what access protections to apply.

If you are not logged in you can either see something (it’s public) or you can’t see something (it is protected). Once someone logs in, s2member can then determine if that particular content is accessible to them or not.

Apologies for my last replay,
Thank you for the replay, Much appreciated.

I understand what you saying about the protected pages and people who can see it, However, My issue is with redirecting. All the download pages are Level #0 so any should see the pages as long as they registered.

I need someone to go from the page below :
https://www.savannahsa.com/public-documents/energy-generation/hartebeest-wind-energy-facility/

to the page below :
https://www.savannahsa.com/portal/downloads/energy-generation/hartebeest-wind-energy-farm/
(this is the actual protected page)

For now it takes a person to the sign/register page.

I looked at all the articles below but not sure how to go about this issue:

  1. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  2. Redirect to previous page after login not working
  3. Disable redirect to membership sign-up
  4. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  5. https://s2member.com/kb-article/customizing-your-login-welcome-page/

For some reason s2member decided to have redirection for level0 different than level1+.

You can get around it by having registered people go immediately to level1 as the free level and make level2+ your paid levels.

You can convert you existing users to the new model using export / import. See https://s2member.com/kb-article/basic-usermember-importexport-guide/

Hi Bianca.

Level 0 protection will require the person to be logged in, not just registered.

The redirection to your Membership Options Page will happen if the person tries to open a page you protected if s2 doesn’t see that he should have access to it. If he is not logged in, s2 can’t tell if he has an account or not, if he’s logged in, s2 will let him access the page you protected at Level 0.

Does that help understand it? If not, could you please explain in more detail what you expect to happen and what is happening that seems wrong? Thanks!

:slight_smile:

Hi & Thanks so much for your reply & explanation :slightly_smiling_face:

So basically a person will already be logged in, however, they are still directed to the MOP page.

For example
I need someone to go from the page below :
https://www.savannahsa.com/public-documents/energy-generation/hartebeest-wind-energy-facility/

to the page below :
https://www.savannahsa.com/portal/downloads/energy-generation/hartebeest-wind-energy-farm/
(this is the actual protected page with level 0)

it currently takes them to the MOP page, I am not good at coding, I have read through some articles that seem to have the same issues but struggle to implement the changes. Your advice or guidance would be GREATLY appreciated please.

Articles I viewed :slight_smile:

  1. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  2. Redirect to previous page after login not working
  3. Disable redirect to membership sign-up
  4. https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/
  5. https://s2member.com/kb-article/customizing-your-login-welcome-page/

Thanks Bianca.

When you say “go from this page to that page”, you mean be redirected, or have the person click on a link to it?

I tried opening the destination URL, and it does take me to the membership Options page, and the MOP vars in the URL say it was because of a Level 0 protection. I wasn’t logged in, so that’s the expected behavior.

It sounds like you are testing while logged in, and still get redirected, is that what is happening? I tried registering so I could then login and test opening that Level 0 page, but the registration times out for some reason and I couldn’t complete it.

Good Day,
Thanks for the response.

to answer your question, When I say “go from this page to that page” I meant a person must be redirected to the page.

I created a Youtube Tutorial basically showing you how I would like it to work & where it takes me too.


Please forgive me, There is horrible noise coming from the Microphone, you are able to hear me through.

I have tested the link page not logged in it still takes me to the MOP.
Would you think this could have something to do with the Level 0 that makes it redirect back to the MOP?