Forums

[resolved] Permalinks, passwords and .htaccess (5 posts)

  1. zackisaiah
    Member
    Posted 4 years ago #

    I've got permalinks set up on my site so it looks like this:

    http://www.mysite.com/events/specific_event/

    I'd like to password-protect the /events/ directory and everything below it using .htaccess. I can create users using my server control panel, and I'm able to update the .htaccess file. Am I going about this correctly? (I'm looking for tips before I go in and mess everything up.)

    Also, this is a long-shot, but how would one go about setting up the site so the wordpress usernames/passwords are used to access those htaccess password-protected directories?

  2. whooami
    Member
    Posted 4 years ago #

    Also, this is a long-shot, but how would one go about setting up the site so the wordpress usernames/passwords are used to access those htaccess password-protected directories?

    You dont, especially if you are looking for a solution where logging in allows you to bypass Apache's mod_auth mechanism, which is what you are actually using. Apache is always going to have its own pop up prompt asking for authentication when using mod_auth.

    You can, however generate matching passwords for users, but if you have a fair amount of them, that might get tedious.

    Here is a good starting point:
    http://www.google.com/search?hl=en&q=htpasswd+generator&btnG=Google+Search

  3. zackisaiah
    Member
    Posted 4 years ago #

    Matching the usernames and passwords is not a priority.

    The real question:

    Is there a way to password-protect a parent page and all child pages?

    Or, can I protect the /events/ "directory" with apache and have the contents generated by WordPress?

  4. eatcake
    Member
    Posted 4 years ago #

    I'm sort of in the same boat. I have permalinks turned on but i'd like to give a client access to a sub-directory like example.com/client/ but it keeps redirecting to index.php instead of displaying an index of the /client directory.

    Is there a workaround for this?

  5. zackisaiah
    Member
    Posted 4 years ago #

    A new plugin was released that handles password protection perfectly: Role Scoper by Kevin Behrens.

    http://agapetry.net/category/plugins/role-scoper/

    Create user groups, then allow the group to access a specific password-protected page and all child pages. Incredible!

Topic Closed

This topic has been closed to new replies.

About this Topic