• I want to implement a redirect (based on browser language settings) via the index.php in root. To either my English language site or my Chinese site. My multisite is configured to use subfolders, not subdomains. So one would be “/en” and one “/zh”. I plan to create a third site, on “/”, where the index.php will detect browser language then redirect (code here).

    The problem is I already have a site on root URL (the English one). How do I safely modify the path to the existing site (from “/” to “/en”)? I can’t believe editing the path alone will work (the path setting in “wp-admin/network/sites.php”). Am I wrong? (It’s a live site so I’d rather not experiment without more information.)

    Do I also need to edit the database and wp-config.php? Or htaccess?

    To complicate things: my multisite installation is in a sub-folder. Htaccess in root has a rewrite base to the subfolder. Should this stay the same, since it’s my core multisite?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter MrHoneyfoot

    (@mrhoneyfoot)

    In fact, I can’t edit the path (from “/” to “/en”). It’s not an option. Unlike my other site, where I can do this from the “wp-admin/network/site-info.php?id=2” page.

    Is it impossible to edit path for the site with “id=1”?

    Thread Starter MrHoneyfoot

    (@mrhoneyfoot)

    Or is it impossible to edit “id=1” because I hard coded a url into wp-config? Like so:

    define('DOMAIN_CURRENT_SITE', 'www.example.com');

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The problem is I already have a site on root URL (the English one). How do I safely modify the path to the existing site (from “/” to “/en”)? I can’t believe editing the path alone will work (the path setting in “wp-admin/network/sites.php”). Am I wrong? (It’s a live site so I’d rather not experiment without more information.)

    No editing that would be bad. ??

    The easiest thing would be to make a new site called EN and port the posts over.

    Baring that, you CAN switch out sites. I explain how in https://halfelf.org/ebooks/wordpress-multisite-110/ (it’s on page 81 I think). The ebook is pay what you want. ??

    Thread Starter MrHoneyfoot

    (@mrhoneyfoot)

    Thanks for the recommendation ??

    As it was, I went ahead and set different primary site, then modified the paths in several database tables and wp-config. Incredibly, it worked.

    This saved me from porting. Which last time cost me a day to complete.

    The problem now is the code to detect browser language then redirect (code here).

    It throws up internal server errors ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What errors?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Edit a site path in multisite for multilingual config and redirect.’ is closed to new replies.