Edit a site path in multisite for multilingual config and redirect.
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?
- The topic ‘Edit a site path in multisite for multilingual config and redirect.’ is closed to new replies.