Hello, How I can protect a link from accessing it? I went to Configuration / Links, added a new record and added the website URL. I just noticed that it does not work. By exemple, if a non-member wants to click on a special link, it should redirect him to a login page and once logged on, it will redirect him back to this link. How I can do that? Thanks
This is impossible to protect links such way. aMember CP -> Protect Content -> Links can be used only to display additional links available for users. It does not protect links.
Then what's the use of Products / Protect Content in the Admin panel? Even if I protect the whole Page, still it does not protect it in any way.
My note above was only about links. If you protect page/folder/video etc... from aMember CP -> Protect Content , content will be protected. But there is clearly no way to protect links. This is just impossible.
So you want to display a link, but when the user clicks on the link, if they arent logged in then they get redirected to another page? Are you using wordpress? If the link is a wordpress protected page- you can set the redirect for non-members. David
>>So you want to display a link, but when the user clicks on the link, if they arent logged in then they get redirected to another page? YES Sadly, I don't use WordPress. I just found out that the specified page cannot be protected fom PRODUCTS / PROTECT CONTENT / LINK. If the user logs-in and is directed to the specified page, it's fine. But if another user does not want to log-in and have an idea what the link does look like, he still can access this page without having to be logged in. I am turning around with no idea how I can protect this page
You have to protect that page itself and not link. If this page is on your server, aMember offer several ways to set protection in aMember CP -> protect Content. If this page is on different server, unfurtunately nothing can be done to protect it. And this is even impossible to protect link. The problem is not in aMember, such protection just will not work. If you can open link in your browser you can share this link with others.
This page is on the server. I went thtough aMember CP --> Protect Content --> Protect pages, but there is nothing that actually makes the page protected. If there is a field where I can paste the link to this page, then it can be protected...
If this page is on the same server, just move that page into any folder and protect folder. If that page is php script use Am_Lite to protect it: http://www.amember.com/docs/Content/PHPScripts
This page had a .html extension and was converted to a .php extension. I added this script at its very top. Code: <?php session_start(); if(!isset($_SESSION['login'])) { header("Location: http://signipedia.com/amember/login?amember_redirect_url=http://signipedia.com/fable4.php"); exit; } ?> From the link you gave me, if you suggest that I have to use Am Lite to protect this page Code: <?php include("aMember_Root_Dir/library/Am/Lite.php"); Am_Lite::getInstance()->checkAccess(array(ONLY_LOGIN), 'Fables'); session_start(); if(!isset($_SESSION['login'])) { header("Location: http://signipedia.com/amember/login?amember_redirect_url=http://signipedia.com/fable4.php"); exit; } ?> The user does not have any paid membership, so checkAccess was changed to ONLY_LOGIN But still can't get it to work.
Just use this code in order to protect page and handle redirects: PHP: <?phpinclude("aMember_Root_Dir/library/Am/Lite.php");Am_Lite::getInstance()->checkAccess(array(ONLY_LOGIN), 'Fables');?>// Your other content here this: PHP: session_start();if(!isset($_SESSION['login'])) { header("Location: http://signipedia.com/amember/login?amember_redirect_url=http://signipedia.com/fable4.php"); exit; } Just will not work with aMember 4