Hope someone can help with htpasswd and wordpress.

Discussion in 'Setting-up protection' started by pepacobos, Mar 9, 2013.

  1. pepacobos

    pepacobos aMember Pro Customer

    Joined:
    May 7, 2012
    Messages:
    27
    I have enabled htpasswd protection in a folder. I need this type of protection because I need to protect an iTunes feed and its content and that's the only way (as far as I know) to protect this type of content.
    I am using wordpress. I have my wordpress installation inside a folder called "Wordpress", my aMember installation inside a folder called "amember" and my desired protected content inside a folder called "Premium", all of these folders are at the same level (top). When I try to access my protected folder for example writing the URL of a file inside it in my browser I don't get asked for user/password as I am supossed to be, instead I get a "Page not found" page.
    It's like it gets lost somewhere.
    I have to say that even my wordpress installation is inside a folder you access it from the root URL because I have my index.php outside that folder and change a line in it and the main .htaccess wordpress file also in root folder.
    That maybe is causing the conflict. It's driven me crazy. I've been with this problem for a week now and I'm so tired of trying to find what's happening in here.
    Read something about permalinks but I'm really lost, any help will be much appreciated.
  2. pepacobos

    pepacobos aMember Pro Customer

    Joined:
    May 7, 2012
    Messages:
    27
    I got this solved!!!! Hope this helps somebody. All you have to do is add this line before everything else in .htaccess file inside the protected folder (NOT wordpress main .htaccess):

    ErrorDocument 401 "Unauthorized access"

    That's it!!! Problem solved!! No more "Page not found"

Share This Page