The MU forums have moved to

domain.tld/su/ works but www.domain.tld/subdir/... always drops the subdirectory (8 posts)

  1. dgwade
    Posted 17 years ago #

    I installed MU with the directory option (not the subdomain option) but wordpress/mu only works without the www in the url. Any time the http://www.domain.tld form of url is used the directory part of the path gets lost [www.domain.tld/subdir/... results in simply http://www.domain.tld/.... So then the page is of course not found whereas with just the domain.tld for of url the path is found [domain.tld/subdir/... displays correctly] and the page works.

    My .htaccess file is as follows:
    RewriteEngine On
    RewriteBase /b/

    # Rewrite to
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #uploaded files
    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]

  2. drmike
    Posted 17 years ago #

    Try changing:

    RewriteBase /b/


    RewriteBase /

    unless you have the WPMU files in /b/. From your post, it looks like you don't.

  3. dgwade
    Posted 17 years ago #

    Well, the reference to subdir in http://www.domain.tld/subdir/... was meant to indicate that WPMU in installed into a subdirectory and NOT in the webroot. While the ... stands for the rest of any wordpress url. The WPMU is installed inside the /b/ subdirectory as in public_html/b/ .

    References to http://www.domain.tld/b/ gets rewritten to http://www.domain.tld whereas references to domain.tld/b/ bring up wordpress files. domain.tld/b/dgwade brings up a user blog and domain.tld/b/ brings up the default or home blog. But http://www.domain.tld/b/ redirects to http://www.domain.tld and http://www.domain.tld/b/dgwade results in a 404.

  4. dgwade
    Posted 17 years ago #

    Not really resolved BUT after deleting the existing install and installing under a single subdomain as in my.domain.tld it seems to work successfully now. I did this because simple domain.tld/b/ worked but http://www.domain.tld/b/ did not work. Installed as my.domain.tld there is only one domain which removed the complication.

  5. blogga
    Posted 17 years ago #

    Please confirm creating a subdomain and installing into subdomain root is the best way to solve the problem of using subdirectories and not having the www ie.
    installing wpmu into so that user blogs are created as & etc.

    Reading this it sounds like the better option, i wonder how it works in practice.

    or has anyone found another work around?


  6. lunabyte
    Posted 17 years ago #

    I have this in one of my htaccess files. It's on a standard WP install, not MU, but it should work the same. It's right after the WP generated stuff. I use it on a lot of sites, so that there's only one index of a page, vice two.

    RewriteCond %{HTTP_HOST} ^www\.domainname\.com$ [NC]
    RewriteRule ^(.*)$$1 [R=301,L]

    Problem that might occur, is if the htaccess file is regenerated. Then you would have to add it back in.

    Just replace domainname with your actual domain name.

  7. blogga
    Posted 17 years ago #

    thanks lunabyte, interesting to know it is possible. i've been weary of hacking (modifying) htacess with concerns it may screw something later.
    i think i'll now probably install to root of the subdomain and use subdirectory install - anybody got any concerns, suggestions or support for this type of install (will that work well?)
    thank you

  8. lunabyte
    Posted 17 years ago #

    I'm doing up a site on a subdomain as well, but I'm also having the users created at username.domain.tld.

About this Topic