weird/inconsistent/incorrect multisite behavior
-
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]
- The topic ‘weird/inconsistent/incorrect multisite behavior’ is closed to new replies.