My primary website on a multisite network was created with the www
prefix (like www.example.com
).
If I try to access pages without the www
prefix (like example.com/page-name/
instead of www.example.com/page-name/
, I am redirected to the homepage (www.example.com
). I would like to change this so I am redirected simply redirected to the same page URL, only with the www
prefix.
Additionally, the 404 error page doesn't work on the primary site. No matter which non-existant URL I try (such as www.example.com/thisdoesnotexist
), I am always redirected to the primary site home page (www.example.com
), rather then seeing the theme's 404 page.
Here is a link to my site where you can test the issue.
example.com/thisisalsoawrongurl
andwww.example.com/thisisawrongurl
, despitewww
, should trigger a 404 error; if not that is also a problem. Please, provide more information about URL configuration, possible .htaccess rules and any other you may consider important for this issue, otherwise it is very difficult to answer, if not impossible.