• i’ve searched the forum a tad but couldn’t find a result for this seemingly simple problem.

    i use “pretty” urls for my wordpress pages and posts (site.com/aboutme/, site.com/gallery/summer-day)

    the htaccess file looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    all my wp related files are in a directory called “wp” (site.com/wp/wp-admin, etc)

    however, i have physical directories not related wordpress i want to manipulate with .htaccess. specifically, i want to password protect one. (site.com/secret). with directory in question is just a directory of files, no index page. also, it has a subdomain attached to it (secret.site.com). of course, when i try to implament an htaccess password protection, i get an alert from wordpress saying that a page could not be found.

    what do i do in this scenario to allow a directory to be password protected without it conflicting with wordpress?

Viewing 6 replies - 1 through 6 (of 6 total)
  • A little confused, is the “secret” directory outside of the “wp” folder or within it?

    http://www.doc4design.com

    Thread Starter grungepuppy

    (@grungepuppy)

    ‘secret’ is a directoy that has nothing to do with wordpress whatsoever…

    website: mysite.com

    where i keep my wordpress files: mysite.com/wp/
    (i mention this on the off chance it’s helpful)

    i’m using custom permalinks
    about me page: mysite.com/aboutme/
    a post in gardening category: mysite.com/gardening/new-flowers-this-spring

    the problem arises when i try to add htaccess to a regular physical directory that has nothing to do with wordpress.

    a directory of photos of puppies: mysite.com/puppypics/

    if i try to password protect it via htaccess, i get a conflict with the wordpress system (it’s trying to recognize it as a page in the wordpress system?). no htaccess, it’s just a regular old directory.

    I am just confirming I also have this problem with WordPress interfering with creating password-protected directories (that do not contain any WordPress files) with .htaccess (or using cPanel to edit .htaccess to create password-protected directories).

    I’m running into this same basic issue. I’m thinking there is an exception that can be added into the .htaccess file but I don’t know what the exemption would be.

    This article mentions creating a new .htaccess file and adding it into the directory you are trying to safe-keep while untainting the original:
    http://www.paperstreet.com/blog/index.php/archives/1680

    I also found this cheat sheet to be of use for anyone looking to dive into .htaccess more than I. http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html

    Please let me know if you figure this out!!

    ** bump **

    I too have been struggling with this and really need someone’s help! Have you guys figured anything out with it?

    Wasn’t able to figure this out. Sorry.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘.htaccess on non-wp directory…’ is closed to new replies.