I have some applications installed on subdomains and a wordpress multisite (that uses subdomains) on the main domain. Everything works fine, but with one issue: trying to access wpsub.example.com/app opens app.example.com (under the URL of wpsub.example.com/app) where wpsub is a site in wordpress multisite network and app is a subdomain that contains an application.

What I want (and think is more logical) is that accessing wpsub.example.com/app will open wpsub.example.com (like trying to access a non-existing folder in a website).

Are there other ways to do this than .htaccess redirect rules which require a list of all application subdomains?

1 Answer 1


It sounds complicated, and I am not sure I fully understand your setup. However, I dealt with the same general idea by putting the WordPress core two levels down (not one, but two). This then frees up the root for other things. .htaccess can be used to direct where the incoming URL for the main site goes. For example in the last line of the WordPress rewrite rule set, the /index.php can be changed to /1/index.php, if that is where the main site content lives.

There is more to it, but essentially the idea was to put the WordPress core two levels down, in its own dedicated directory, and then to put {wp-content} as its peer as a top level directory. This makes quite a difference already, and may help prevent subdomains or other or other applications from conflicting with the main WordPress core files.

Your Answer

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

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