amember 4, Am_Lite and subdomains

Discussion in 'aMember Pro v.4' started by jamplay, Aug 8, 2012.

  1. jamplay

    jamplay New Member

    Joined:
    Aug 29, 2006
    Messages:
    4
    I have a main domain and a subdomain setup.

    example.com
    members.example.com

    I have amember 4 installed at example.com/pro.

    Using Am_Lite I'm attempting to protect the index page in members.example.com. Which it seems to do for the most part. It forwards a visitor to http://example.com/pro/login/index?amember_redirect_url=/

    Clearly I need to be able to indicate the full address for amember_redirect_url. But I'm not sure how this is done via Am_Lite::getInstance()->checkAccess(array(2), 'Page Title');

    Second, even after successfully logging in, any time I try to access members.example.com, I get forwarded back to example.com.

    I've read though a few threads, in particular this one:

    http://www.amember.com/forum/threads/new-rewrite-cookies-and-sub-domains.13398/

    It appears I SHOULD be able to do this. (I have had the same setup working for over a year now using amember 3.x)

    Any help would be appreciated.

    Thanks

    Please note, the application I am working with is based on an PHP MVC framework, thus protecting discreet folders/files is not relevant. Further, I will need to control which products can access which page via PHP in the controllers. The Am_Lite object is what I need, I just need it to work in a subdomain.

Share This Page