Protection Help Please

Discussion in 'Setting-up protection' started by bigted, Nov 20, 2007.

  1. bigted

    bigted New Member

    Joined:
    Nov 17, 2007
    Messages:
    8
    Hi,

    I may have made a mistake but need a little advice.

    I am setting up a membership area in a subdomain off my main site. I used joomla for the subdomain members site. I set amember to protect the whole subdomain and now cant get into the subdomain to add content, change templates etc.

    Is there a way of turning off the protection for a while so I can add content then turn it back on?

    I am a total newbie here and haven't got a clue what to do.

    Thanks

    Ed
  2. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    Did you use the "new mod_rewrite" protection? If you chose that one, FTP into your account, open the directory with the protection enabled (it will be the Joomla subdomain dir in this case) and rename .htaccess to something like "htaccess.txt".

    When you want to enable the protecting again, rename the file back to ".htaccess".

    That should do the trick.

    Tomas
  3. bigted

    bigted New Member

    Joined:
    Nov 17, 2007
    Messages:
    8
    Thanks Tomas,

    That seemed to do the trick but now I have done something to upset the protection completely. I think the .htaceess file has corrupted or something as it doesn't offer protection anymore. It worked with your suggestion initially. Any suggestions?

    I am trying to find a copy of the .htaccess file to replace the one on my site.

    Ed
  4. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    You should be able to find htaccess.txt file that needs to be renamed to .htaccess in the aMember installation .zip file. So simply use the one from there.

    Tomas
  5. mamiebrown

    mamiebrown New Member

    Joined:
    Oct 10, 2007
    Messages:
    4
    Tomfra, Have you experienced a hung protect.php?action=add?

    My Protect another folder link doesn't work! Help . . . I've filled out two tickets and haven't received any reply. What's the deal with tech support??

    protect.php?action=add is getting hung - no reponse . . . Any ideas?
  6. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    Do you get any error message? That would help. It's just a guess but aren't you on a shared hosting with PHP safe mode turned on?

    It's hard to guess what may be causing this problem without having more information.

    Tomas
  7. mamiebrown

    mamiebrown New Member

    Joined:
    Oct 10, 2007
    Messages:
    4
    Yes I have shared hosting with PHP. Error: Does not give error message. 1. I clicked "Protect Folders" in amember CP 2. No folders are show protected 3. I clicked "Protect Another Folder" 4. Firefox asks if I want to open protect.php or save to disk 5. I choose to open 6. It opens in Dreamweaver as protect.php 7. Shows up as a blank document.
    Am I suppose to add something inside the doc?
  8. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    Aha, that's the problem! For some reason the server refuses to parse protect.php as a php script. Must be a misconfiguration caused probably by incorrect .htaccess somewhere. Do you have .htaccess in either the /amember/admin or /amember directory?

    Another possibility - didn't you upload protect.php in binary mode? This PHP file is unencrypted, therefore it has to be uploaded in text mode. Any decent FTP client should set it for you correctly, unless you chose to override the default settings.

    Tomas
  9. mamiebrown

    mamiebrown New Member

    Joined:
    Oct 10, 2007
    Messages:
    4
    No, I have .htaccess in the directory of the html pages (also not in the amember directory) I am displaying. Tech support said it doesn't matter where .htaccess is.

    Where should .htaccess be located? Does it need to be in the same directory as protect.php?
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Your issue was fixed at Tuesday already(I send a reply in the ticket). Protection worked from Tuesday as well.
  11. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    I know this issue has been solved already but just wanted to answer this question because I believe many people are wondering which .htaccess file is the valid one when there are multiple ones in the directory structure.

    The answer is - all of them in the directory structure going upwards do!

    For example if you have:

    /public_html/amember/admin/.htaccess
    /public_html/amember/.htaccess
    /public_html/.htaccess

    All of them can have effect on how files are parsed in /public_html/amember/admin/ - the importance being put on the first .htaccess found so /public_html/amember/admin/.htaccess .

    Please someone correct me if I am wrong but I believe that Apache first looks for the .htaccess file in the current directory and then goes upwards and checks if there are other .htaccess files in the directory structure. I think it does work this way...

    Tomas

Share This Page