Support » How-To and Troubleshooting » htaccess not working

htaccess not working

  • 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?

Viewing 11 replies - 1 through 11 (of 11 total)
  • 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.

    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….

    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?

    Is WordPress installed in the root?

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

    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!

    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.

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

    Ditto…. phooey.

    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 🙂

    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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘htaccess not working’ is closed to new replies.