permalinks and subsite issue (6 posts)

  1. semyou
    Posted 1 year ago #

    I have a WordPress multisite install on Nginx. Currently I have site1.com as main site. And I added a new site called site2.com as subdirectory. However, I noticed you can actually click on Network Admin > Sites > Edit (site 2), you can change the domain = site2.com and path=/. Instead of using domain=site1.com and path=/site2.

    I created to nginx vhost config files under sites-available. And site1 and site2 both work fine. Now you are asking me what is the problem?

    The problem is with the permalinks. If you put them to /blog/%postname%/ both site1 and site2 work fine. However if you enter site2.com/blablablablaIAMFAKE the server redirects to site1.com whereas it should remain on site2 and display a 404. If you enter site2.com/blog/blablalbalbla the 404 is displayed appropriately.

    One possible way to solve this is to remove the /blog from the permalinks. The tip given on the internet to change the permalink structure per site to default, and to change it under network admin >edit site> settings to /%postname%/ works fine for site1.com (the primary site). But not on site2.com.

    Any ideas what could be wrong.


  2. I would recommend to not change anything in those settings.

    Are you mapping your 2nd domain with http://wordpress.org/plugins/wordpress-mu-domain-mapping/?

    So site1.com is your primary domain. So you created the subsite site1.com/site2 and then mapped that to site2.com?

  3. semyou
    Posted 1 year ago #

    Hi Patrick,

    Strangly enough, it works without any plugin. This is new and only worked for me under 3.8. All you need to do is go under network admin > edit sites and then modify the site you want by changing the domain and path. It works!

  4. semyou - We suggest you NOT do that since it can cause other problems with upgrades and plugins and settings. but if it works, hey, carry on.

    We suggest you use the plugin Patrick linked to.

  5. semyou
    Posted 1 year ago #

    Hi Mika,

    The domain mapping is not the problem. It's the permalinks and how the 404 is managed. I will try Patrick's with the domain mapping plugin.

  6. You THINK the problem is permalinks, but what if I told you the plugin helps with that?

Topic Closed

This topic has been closed to new replies.

About this Topic