• the setup:
    I use wordpress as a portal. It is installed right in public_html and other sites are stored in subdirectories of public_html

    I use pretty permalinks in wordpress.

    the problem:
    Whenever I try to password protect one of the sites in the subdir of the WordPress install (by putting a .htaccess with password auth stuff in the subdir), I get bounced back the wordpress with a 404 error.

    Tim
    https://sitebuilt.net

Viewing 1 replies (of 1 total)
  • Thread Starter mckenna.tim

    (@mckennatim)

    I found an elegant solution from junkster at https://www.webmasterworld.com/apache/3688208.htm

    “Simply by declaring and creating a valid 401 document
    *not in* the protected directory, *then* the ‘protected
    directory’ behavior works with the wordpress code.

    To summarize what I’ve done – and believe to be the minimal implementation:

    I created 2 files:

    /Forms/401.html

    AUTHENTICATION REQUIRED
    If you have been granted access,
    you will have an email with user
    and password details.

    /protected-dir/.htaccess

    ErrorDocument 401 /Forms/401.html
    AuthType Basic
    AuthName “Paid Member”
    AuthUserFile “/home/acct/.htpasswds/public_html/protected-dir/passwd”
    require valid-user ”

Viewing 1 replies (of 1 total)
  • The topic ‘pages below wordpress can’t be password protected’ is closed to new replies.