The MU forums have moved to WordPress.org

nested subdirectories (5 posts)

  1. philipcrandall
    Member
    Posted 16 years ago #

    Has anyone used a nested subdirectory scheme when installing wpmu? The objective would be to have something like...

    blog.domain.edu/departments/departmentName
    blog.domain.edu/students/studentName

    Alternatively, has anyone done a multilevel subdomain install?

    departmentName.departments.blog.domain.edu
    studentName.students.blog.domain.edu

    I've tried to work on the .htaccess rewrite rules because I believe that is the problem, but I'm unfortunately not very good with them. If someone has done this before and has a solution, I would greatly appreciate it. If not, a breakdown of what the rewrite rules are doing would be greatly appreciated. The rewrite rules for my installation are (regular subdirectory installation in the web root)...

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

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

    Thanks!
    philip

  2. lunabyte
    Member
    Posted 16 years ago #

    Avoid Sub directories like the plague.

    You could manage a main domain, and multiple sub-domains though. A domain is a domain to MU, whether it's a sub or not.

    So if you have your install be able to answer to domain.tld, sub.domain.tld, and sub2.domain.tld, it's no different than having it answer to domain.tld, domain2.tld, and domain3.tld.

    Search here for domain mapping.

  3. drmike
    Member
    Posted 16 years ago #

    You can try directly modifing the path variables within the database. I could have sworn that someone tried it in the past. not sure if it worked or not.

    WPMu is designed to work off of the root of it's location.

  4. philipcrandall
    Member
    Posted 16 years ago #

    Thanks for the replies.

    I think I'll skip on trying to modify the path variables in the database drmike. It would create something that wasn't very easy to administer. I think I'll stick with its designed behavior and have things work off the root directory.

    lunabyte, thanks for the multiple sub-domain suggestion. I think that's the way I'll go. Something along the lines of...

    students.blog.domain.edu/user
    classes.blog.domain.edu/course

    Thanks again to both of you for the help.

  5. lunabyte
    Member
    Posted 16 years ago #

    It will take multiple installations, most likely, but you can set those installs up to use the same "global" tables (sites, users, etc), and pretty much achieve the same thing, but have a singular login.

About this Topic

  • Started 16 years ago by philipcrandall
  • Latest reply from lunabyte