MS moving from subdomain to subdirectory doesn't work, shows posts
-
Hello world, I’m running into a difficult to diagnose problem as I’m trying to switch network type from subdomain to subdirectory for an existing and very active multisite install.
When I set
SUBDOMAIN_INSTALL
to false and then try a blog URL as network.com/blog, WordPress takes /blog as an “incomplete slug” and returns a single post that belongs to the main blog at network.com.The server uses CentOS with the latest stable nginx and php-fpm. We use the standard domain mapping plugin and currently blog.network.com has blog.com set as primary domain. Everything works perfectly with subdomains and domain mapping.
The relevant nginx location segment is:
location / { try_files $uri $uri/ /index.php; }
So nothing interferes with WP’s processing. Whatever resembling a pretty permalink get thrown to WP for deciding what to do and it’s doing the wrong thing. Caching plugins were disabled, without changes on the behavior.
The only thing “strange” is that
BLOG_ID_CURRENT_SITE
set to an ID different to 1 because we changed the main domain to one of our blogs. The blog with ID=1 now resides at a subdomain “original.network.com”. I tried original.network.com/blog and it redirects me to the BLOG_ID_CURRENT_SITE (our new main blog) homepage.Now with
SUBDOMAIN_INSTALL
set tofalse
, subdomains still work (and redirect to the correct primary mapped domain). I restarted EVERYTHING in the web stack, so this doesn’t seem to be a caching thing.Can somebody shed some light? I feel like I’m running in circles.
Thanks in advance.
Andres
- The topic ‘MS moving from subdomain to subdirectory doesn't work, shows posts’ is closed to new replies.