The MU forums have moved to WordPress.org

moved WPMU to new domain, users can't access their blog dashboards (7 posts)

  1. decavolt
    Member
    Posted 14 years ago #

    I recently moved a very large WPMU site (300 member blogs, 3,500 registered users) to a new domain on the same server. Everything is working perfectly except that users can not access their blog dashboards. I, as the administrator, can access the main site's dashboard, but not any other of the blog dashboards.

    What could be causing this?

    I've verified that siteurl, domain and path fields are all correct in the database, and have tried disabling plugins. The site has never used subdomains for blogs.

    The old folder structure on the server was:
    > www/[wpmu installed here]

    The new folder structure on the web server is:
    > www/example.com/[wpmu installed here]
    with the new domain mapped to example.com

    The only other thing I can think of is an incorrect htaccess file. Here's what I have now:

    www/example.com/.htaccess:

    RewriteEngine On
    RewriteBase /
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2
    RewriteRule . index.php
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    www/.htaccess: (old blog location):

    Options -indexes
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
  2. dgilmour
    Member
    Posted 14 years ago #

    I'm no expert, but I'd be looking at the .htaccess file too. Your one looks OK to me. Have you checked that the protection isn't set incorrectly, preventing them reading it? Something makes me think I may have been there...

  3. andrea_r
    Moderator
    Posted 14 years ago #

    the old htaccess file in the old location looks way too short. But, strangely, it worked, right?

    What happens if you swap 'em? (make backups first)

  4. decavolt
    Member
    Posted 14 years ago #

    Swapping .htaccess files would be pointless.
    Even before attempting it I can tell you exactly what it will do. Any visitors using the old URL won't be properly redirected to the new one. And any visitor using the new URL will get a redirect loop from example.com to example.com. If I were to rem the redirect line, visitors won't get the proper permalink structure, and uploading (if it were accessible via the dashboard) would have issues and fail. And if I redirect from the new domain (with the old .htaccess) to the old domain (with the new .htaccess) there's no point in moving to the new domain in the first place.

    The htaccess in the old location is short because its only purpose is to redirect to the new domain and disallow a directory index. It's really not strange that this works.

  5. decavolt
    Member
    Posted 14 years ago #

    SOLVED.

    The .htaccess file in the new wpmu location was the issue. I reloaded the contents of htaccess.dist to .htaccess and things are back to normal. Looks like the problem was a few missing [L] param on the RewriteRules.

  6. andrea_r
    Moderator
    Posted 14 years ago #

    The htaccess in the old location is short because its only purpose is to redirect to the new domain and disallow a directory index. It's really not strange that this works.

    Then I misunderstood how you worded the post. :) it look like you were saying "here's the old one! this worked!"

  7. tdjcbe
    Member
    Posted 14 years ago #

    Do remember to change the RewriteBase line as the one in the htaccess.dist file gets modified.

About this Topic