0

Have a little bit of a problem with wordpress / multisite. So, I have multisite installed on a domain. On this I've created several websites, that are pointed to they domains with the Domains Mapping plugin.

One site is www.test.com (not a real website) - and it works perfectly. Now, I want, another website to point to www.test.com/test/ (it's a different website).

Everything I've tried, failed. (I've change the website link to www.test.com/test/, I've pointed the id of the website to the www.test.com/test/ with primary).

Can it be done?

1 Answers1

2

Add this code in the top of the function.php file for multisite function.

`if (strpos($_SERVER["REQUEST_URI"], 'sitemap') !== false || $_SERVER['HTTP_HOST'] !== 'www.test.com') {
update_option('siteurl', 'www.test.com/test');
update_option('home', 'www.test.com/test');else {
update_option('siteurl', 'www.test.com');
update_option('home', 'www.test.com');}