amember not protecting subdomains

Discussion in 'Troubleshooting' started by drmartinjr3i3, May 28, 2011.

  1. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65
    I have build several subdomains on my site. I need to protect pages on these.
    but when i try to protect them they end up causing a page can not be displayed error.

    i.e. subsitea.mydomain.com
    protect

    subsitea.mydomain.com/member/

    when protected makes all pages within and under /member give a 404 error

    the pages display without issue without protection

    in addition they display even when protected if i try to link to them as

    mydomain.subsitea.com/member/

    what can I do to resolve this?
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Where is aMember installed?

    Your setup should be:

    primary domain: yourdomain.com
    amember install: yourdomain.com/amember
    subdomain: subdomain.yourdomain.com

    Users should login to the primary (ie. yourdomain.com/amember) and all subdomains will honor it.
  3. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    510
    Darrell left of that he want to do it with .htaccess protection.

    What is happening is that..

    primary: example.com
    wordpress: wp.example.com
    htaccess: wp.example.com/htaccess

    The htaccess from wordpress is interfering with the htaccess one .. I tried to work around the issue but couldn't spend ages trying to make it work as it should. The WP htaccess is causing the next one to fail with a 404, works fine when the access directives are removed.

    Larry
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Can you just protect the Wordpress installation using the Wordpress plugin to avoid hacking the .htaccess?
  5. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65
    using amember to control user protection - jlogica is there a way to do this?

    re skippy - they can login but it ends up blocking the pages
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Normally this should work when you put WP Rewrite rules before amember's Rewrite Rules in htaccess but I guess you have this issue because wordpress installed on subdomain.
    Contact me in helpdesk I will help to troubleshot it.
  7. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65
    submitted ticket in helpdesk
  8. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    510
    Just to clarify ...

    Wordpress is not protected at all, the .htaccess there is the WP redirector commands, the sub-directory of the sub-domain that is protected using aMember .htaccess returns a 404 error, remove it no error it works.

    There is a conflict of some sort in the case where Wordpress is installed as a subdomain using its htaccess for seo links and aMember protecting a subfolder of the subdomain.

    If it were standard level goorooness I would have solved it.

    Larry
  9. drmartinjr3i3

    drmartinjr3i3 aMember Pro Customer

    Joined:
    Nov 21, 2010
    Messages:
    65
    still works with hta access though if written as domain.com/sub/member just not as sub.domain.com/member - so it is not a wordpress conflict or it would not work either way

Share This Page