WordPress.org

Forums

[resolved] weird/inconsistent/incorrect multisite behavior (2 posts)

  1. newcopress
    Member
    Posted 1 year ago #

    We had a wordpress site in a sub-dir with apache using an Alias to get to it as the DocumentRoot was set to some non-WP, static files.

    Now we are trying to convert to multisite and we want the existing wordpress sub-dir to stay in that path. While the new default site will live @ the root path (i.e. / ) & so the DocumentRoot is now seta to WP. We also updated the permalinks setting to remove the /blog/ slug as we don't want any of our existing URLs to change.

    After following the conversion instructions, we have been getting inconsistent results. We updated the entry in the wp_site table which had the sub-dir path and changed it to the root path (i.e. / ). When not logged in, the root path usually shows the original sub-dir path's content. When logged in, everything seems to load as expected.

    Here's our rewrite rules:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    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]

  2. newcopress
    Member
    Posted 1 year ago #

    marking this resolved. I enabled our plugins that were active pre-multisite upgrade and the problem magically vanished

    I also rolled back my database to its pre-multisite state and walked through the steps again and couldn't reproduce the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic