Logging in

Discussion in 'Templates customization' started by 519consultancy, Apr 26, 2009.

  1. 519consultancy

    519consultancy New Member

    Joined:
    Oct 12, 2008
    Messages:
    7
    Hi all,

    I want to protect a folder on my server so only active and paid members can access it. For some reason I can not use the new rewrite method.

    Is there something I need to do or a code I need to put onto my hosts server to make this new rewrite work?

    Please bare with me as I'm not an expert. My files are all html - if that helps in anyway.

    Many thanks in advanced for your help and support :)
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Check to see if mod_rewrite is enabled on your host. amember admin /version info / do a search for mod_rewrite enabled. If you see it you can have amember fix the code to allow it.

    If its not present, send a tech support ticket to your host to enable it.

    David
  3. 519consultancy

    519consultancy New Member

    Joined:
    Oct 12, 2008
    Messages:
    7
    1and1

    Thanks for the reply David!

    I have spoken to 1and1 (my host) and they have advised that it is definitely switched on. I have tried the following code in a .htaccess and php.ini file and still nothing:

    RewriteEngine On

    Am I missing something here?
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
  5. 519consultancy

    519consultancy New Member

    Joined:
    Oct 12, 2008
    Messages:
    7
    Thanks David!

    I put the code into the protection_methods.inc.php file at the top but within my admin side of the membership database I get an error now???

    Code:
    Parse error: syntax error, unexpected $end in /homepages/.........../admin/protection_methods.inc.php on line 310
    Not sure what this means?

    I checked in 301 and I saw this

    ?>
  6. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    not sure what you did, you should have just added // before
    elseif ($ret != '2-second_file')
    and
    return "RewriteRule doesn't work in .htaccess files on this server";

    so it looks like this
    // elseif ($ret != '2-second_file')
    // return "RewriteRule doesn't work in .htaccess files on this server";

    David
  7. codeispoetry

    codeispoetry aMember Pro Customer

    Joined:
    Jan 12, 2009
    Messages:
    336
    Hi 519,

    You might have added/remove some important code accidentally.

    Can you restore to your backup file and try editing it again?

    Lee
  8. 519consultancy

    519consultancy New Member

    Joined:
    Oct 12, 2008
    Messages:
    7
    Hi all,

    The Support Desk managed to help me out!

    Thanks once again for your time and expertise, greatly appreciated.


    Andrew

Share This Page