• Hi,

    I’ve got WP 2.1 installed at the top level (example.com) and other non-WP files in other directories, like “stuff/”

    The problem: .htaccess is requiring ./index.php … preventing access to those non-wp directories. [EDIT: This is only affecting non-wp directories that also have .htaccess protection themselves. ]

    Is there an edit for .htaccess or ./index.php that will fix this? Can this edit be preserved when updating permalinks via the admin interface?

    Thank you in advance, mighty WP users!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    This only happens in a special circumstance. Namely, when you try to use .htaccess to password protect directories under the WordPress directory.

    The solution:
    1. Create a file on your website. Call it onerror.html. It can have just <html></html> in it for all that it matters. Doesn’t matter where it is located.
    2. In WordPress’s .htaccess file, add this to the top of the file, before any other lines:
    ErrorDocument 401 /path/to/onerror.html
    ErrorDocument 403 /path/to/onerror.html
    3. There is no three, your problem should now be solved.

    I can explain why this works in greater detail if you’re interested, but you’re probably not. ??

    I’d like to know more detail.

    That fixed a problem I was having too.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess interfering with viewing protected, non-WP directories’ is closed to new replies.