0

I have a domain - www.mydomain.com Inside there is a folder with Multisite install - www.mydomain.com/sites Multisite is installed with subfolders. I have a site, let's say - www.mydomain.com/sites/mysite.

Now, when browsing to www.mydomain.com/sites and to mydomain.com/sites (without www) - both work. When browsing to www.mydomain.com/sites/mysite - works well too. But - when browsing to mydomain.com/sites/mysite (without the leading www), it's being redirected to the main site - www.mydomain.com/sites instead to the specific mysite.

I figured out it may be related to WP multisite that is main site located in a subfolder, but couldn't figure out how to make mydomain.com/sites/mysite redirect to www.mydomain.com/mysite as expected.

p.s I use a fresh install of latest WP

1 Answer 1

0

Wordpress redirects to the URL you gave it when you set it up. So if you told Wordpress you domain was www.domain.com and typed into the browser domain.com it would redirect to www.domain.com. This is expected. The only way to change that is to change it in the database. You can find the URL in two places in the _options table. Field names are home and site_url.

2
  • Thanks @stoi2m1, all that is known. But the issue is that browsing to www of a subsite in the multisite install is not working, so it redirects back to the main site of the multisite. It does go from domain.com to www.domain.com, and and also from mydomain.com/sites to www.mydomain.com/sites, but for some reason the base of the main multisite is being removed when browsing to a site inside the multisite. Jun 22, 2016 at 10:21
  • Continue: Expected is that when going to mydomain.com/sites/mysite, will redirect to www.mydomain.com/sites/mysite, (where the /sites is the main multisite url), but instead it is being redirected from mydomain.com/sites/mysite to the main multisite install at www.mydomain.com/sites instead. Jun 22, 2016 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.