The MU forums have moved to

folder in sub directory with the same name as a MU blog causing problems (9 posts)

  1. bunshi
    Posted 15 years ago #

    I'm pretty shaky in terms of my .htaccess knowledge, so I don't really know how to search for my problem. I can only explain whats happening. Maybe somebody could point me in the right direction?

    Wordpress MU doesn't like it if there is a sub directory on the actual server with a name the same as the blog, even if there isn't a index.php file there. How can I fix this?

    The problem is, is that I put MU on the server to replace individual wordpress blogs, they were all running in sub domains that have the same name as the blog that MU will use. This is because a lot of search engines have indexed the pages, and many other sites link here, and I want to preserve the directory structure. There is some stuff that can't be removed in the sub directories where the blogs were. Like I said, the root of these subdirectories have no index files in them, but just having the sub directory there is enough to cause 404 errors when you enter the url of the blog.

  2. drmike
    Posted 15 years ago #

    What do you mean by "wpmu doesn't like" Are you getting errors or what? Please give specifics as (I'm sorry to say) your rambling doesn't give us a whole lot to go on.

    First thing I would try if I understand you is plaing he subdirectories within the "do not use" list within the Site Admin. Until we know what you're looking at though, I can't make any other suggestions.

  3. bunshi
    Posted 15 years ago #


    Try this. Make a blog who's name is "brock". Also, put a folder in your root wpmu install named "brock". you will get a forbidden error when you try to go to the blog.

    That's my problem. I can't delete these folders, and I can't rename the blogs.

  4. Ovidiu
    Posted 15 years ago #

    like drmike said - put brock inside the do not use" list within the Site Admin

    maybe this post helps you?

  5. andrea_r
    Posted 15 years ago #

    You can't have both.
    You cannot have a blog names "brock" AND a folder with stuff in it named "brock".

    If it absolutely must be that way, because you have to keep those files, create the blog. MOVE the files to that blog's files folder, which will be /wp-content/blogs.dir/path-to-blog-id. Remove the original folder off there. It cannot stay.

    The search engines will find it, I promise. Anyone who has linked to it, it will still "look like" it's where it is supposed to be, because mu will plunk the stuff in front of it.

  6. bunshi
    Posted 15 years ago #

    Well, I really appreciate your investigating the matter for me. I'll weigh the options and tell those who are having their blogs replaced what must be done.

  7. bradmkjr
    Posted 15 years ago #

    not sure if this helps but:

    these lines:
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d

    tell it to NOT redirect if there is a files -f or directory -d present that match the name, hence why the wp-admin folder works.

    So, if the folder is there, then it won't redirect, and the 404 you are getting is because it doesn't know where to go.

    What might make this possible, is some careful htaccess hacking. basically have 2 sets of rules, standard wp-admin and wp-content, where if the folder or file is there good.

    Otherwise if the request is for a old blog, don't check for a folder, only if the file is present, then clean the blog folder down to just the "must have" files. So if there is an uploads folder and someone directly linked to "uploads/1981/07/05/birthday.jpg" it would pass through the htaccess file and the server would return the picture, but if someone linked to the folder: "uploads/1981/07/05/" it would fail, and get redirected to the blog, where it would then get a blog generated 404.

  8. bunshi
    Posted 15 years ago #

    Awesome!! That is what I was looking for! Thanks a lot! Thank you to everyone for helping me.

  9. bunshi
    Posted 15 years ago #

    OK, so like I said, I don't know a lot about .htaccess.

    From my .htaccess file, I just removed the line

    RewriteCond %{REQUEST_FILENAME} -d

    The only thing that seems to have changed is that I have to use

    /wp-admin/index.php and I can't enter /wp-admin/

    Is that the only downside, or am I missing something?

    Basically, if that's the only downside, I'll just live with it. I mean, right now, I have wordpress MU working with all the other folders that are there, and if there is a old file that needs to be accessed, it works.

About this Topic