htaccess blocking access to other directories

Hello, Hoping someone coudl help me out here. Ive tried to research the htaccess stuff but any edit I made, the results were that I couldnt view my blog posts anymore... so apparantly im not comprehending. :slight_smile:

Ok, heres what is happening, I installed wordpress multisite 3.03 and autoblog onto my site. wordpress said to copy and paste ceratin code into the htaccess. i did that, but now Im unable to view other directories (not relating to wordpress). I was using other directories for other things. Is there a way to edit the htaccess to allow me to atleast view certain directories?
if anyone is able to help, i really appreciate it. :slight_smile: thanks

* Im not sure if this comment will allow me to post the htaccess code, but if so, here it is below:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

# END WordPress

  • Shane7
    • Site Builder, Child of Zeus

    I just realized that it only happens to directories in which i set a password for (via cPanel)... so it seems as though htaccess doesnt recognize these directories when they are password protected? because if i take the password off, I can see them again...

    is there a way to keep a directory password protected, and still use it?

    main site with wordpress:
    password protected directory:

    how can i use this 'password protected' testing directory? It wont recognize it once i installed the htaccess that wordpress requires.

  • Shane7
    • Site Builder, Child of Zeus

    Thanks. That technic pretty much did the same thing that cPanle seemed to do.
    When I set that up, and then try to enter my protected directory (example:, Im redirected to the wordpress blog at root (

    Im wondering if its just not possible to set up a blog, and use protected directories.

    If I unportect the directory, then im able to use it, but protected, and it gets redirected to the blog.

  • drmike
    • DEV MAN’s Mascot

    We call them previous subdirectories. You have to declare them in your htaccess file:

    RewriteCond %{HTTP_HOST} myinstall.tld/subdirectory
    RewriteCond %{REQUEST_URI} !subdirectory/
    RewriteRule ^(.*)$ subdirectory/$1 [L]

    I think that's right. We had this big long thread on this back on the old mu forums (and here a couple of times as well) but I can;t find them right off.

    Hope this helps,

    edit: You also have to add the subdirectory to your banned name list as well.

  • Shane7
    • Site Builder, Child of Zeus

    Hi, Thanks for the reply.

    I tried but no luck. I even placed the code in different places :slight_smile:
    Where exactly do I put it?
    - I had it above the "#begin wordpress"
    - I tried it inside the "#begin wordpress", at various places

    but still no luck.

    RewriteCond %{HTTP_HOST}
    RewriteCond %{REQUEST_URI} !directory/
    RewriteRule ^(.*)$ directory/$1 [L]

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.