htaccess not working (12 posts)

  1. khaled
    Posted 9 years ago #

    Seems I can't set up my .htaccess into a subdirectory, WP won't allow that and instead I get an 404 error.

    This is using the standard method taken from here for example:

    I've done a search and there seems to be a couple of issues of this cropping up with v2.0 but the codex page on this particular topic hasn't been filled out yet.

    Can anyone point me in the right direction?

  2. Chris_K
    Posted 9 years ago #

    More details. Are you replacing the existing .htaccess with the one you linked? That will certainly break your permalinks.

    Adding the WordPress section from your current .htaccess to that new one should be just fine though.

  3. vkaryl
    Posted 9 years ago #

    Actually, I had this problem myself trying to password a folder with WP installed in it through cPanel - it doesn't work. No matter what you do, where you add the info etc.

    I tried the "vanilla" route by adding the pw stuff to the .htaccess myself as well - no love....

  4. khaled
    Posted 9 years ago #

    I should really give a bit more explanation.

    Basically I'm trying to sort out a specific folder that has nothing to do with the main install. So I'm not really touching the main htaccess file in the root folder.

    So if I've got folder home/mysite/dev, I'm putting another .htaccess and .htpword (or whatever it's called) into the dev folder. Should I be editing the main root htaccess files?

    Unfortunately the second I do that WP doesn't seem to like that. How do I password protect this particular folder?

  5. Chris_K
    Posted 9 years ago #

    Is WordPress installed in the root?

  6. khaled
    Posted 9 years ago #

    Yes. That's what seems to be the cause of the problem.

  7. vkaryl
    Posted 9 years ago #

    And yes, from me as well. So if someone can figure this out, I'd be forever grateful, as I'm sure khaled will as well!

  8. Chris_K
    Posted 9 years ago #

    urk. hmm... yeah, I got nothing. But then, I'm far from an .htaccess wiz.

    Sure seems like it shouldn't be an issue, though.

  9. khaled
    Posted 9 years ago #

    sh!t :), that's no good :).

  10. vkaryl
    Posted 9 years ago #

    Ditto.... phooey.

  11. Mark (podz)
    Support Maven
    Posted 9 years ago #

    This will shed some light:

    but I'd read this first:

    I don't recall many other topics about it as this sort of thing is more for those very very few who know rewrite voodoo :)

  12. AskApache
    Posted 8 years ago #

    You can password protect the new dev folder by placing the auth code in your dev/.htaccess file

    Then if your root /.htaccess file that wordpress runs off of add this section above the wordpress section.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/(dev|failed_auth.html)/?.*$
    RewriteRule ^.*$ - [L]

    From http://www.htaccesselite.com/htaccess/making-folders-files-password-protection-work-with-3rd-party-vt170.html

Topic Closed

This topic has been closed to new replies.

About this Topic