Getting WP to Ignore Directory? (6 posts)

  1. jambelly
    Posted 8 years ago #

    I like having WP "run" my site, but I'd like to be able to designate the odd subdirectory for "other" uses and have WP ignore it. For instance, if my site is http://www.mysite.com and WP is in the root, I'd like to be able to create http://www.mysite.com/ABC and have an .htaccess file in it so my brother could mess with is own private directory.

    How can I do this? When I set up the directory, WP seems to intercept a page request and dish itself up instead. Take a look if you like:
    should prompt for a password and username, and based on a .htpasswd file entry, should allow http://enggeek.ca/ee315/index.html to be sent. It doesn't happen.

    Thanks in advance to anyone gracious enough to reply!

    Jim Murphy

  2. Hempsworth
    Posted 7 years ago #

    I'd like to do exactly the same!

    Any luck with this? Can anybody shed some light onto the matter?


  3. For any normal directory, just create it and it'll work. No changes needed.

    When you're using password protection, you'll need to modify WordPress' .htaccess file slightly.

    The workaround is to create an empty file somewhere called "onerror.html" and then to add these lines to the main .htaccess, before the WordPress rules:

    ErrorDocument 401 /onerror.html
    ErrorDocument 403 /onerror.html

    Change the path as appropriate for your setup, of course.

  4. Shyzer
    Posted 7 years ago #

    Otto, thank you so much for that little workaround. I was having the exact same problem as the first two posters, but your little trick did the...uh...trick.

  5. kzutter
    Posted 7 years ago #

    Thank you, I searched all over for this problem.
    I knew that WordPress was rewriting my apache authorization requests.
    I just didn't know what to do about it.
    I love simple solutions. Thanks again.

  6. tompress
    Posted 7 years ago #

    Thank you, thank you, thank you for this solution! I don't really know WHY this works, but it does ;)


Topic Closed

This topic has been closed to new replies.

About this Topic