WordPress.org

Ready to get started?Download WordPress

Forums

Domain Mapping - Mixing Subdomain and Subdirectory (11 posts)

  1. noctorum
    Member
    Posted 3 years ago #

    I am currently running a wordpress multisite network on version 3.2.1. When the network was originally setup, it was marked as being for subdomains. This worked fine for simple domain mappings. However, a new scenario has come up that is a bit more complicated.

    I have a client with 3 blogs hosted at another website in the format of;

    mainblog.otherprovider.com
    main.otherprovider.com/anotherblog
    main.otherprovider.com/andanother

    They currently have those blogs mapped to their primary domain in the same fashion;

    blog.domain.com
    blog.domain.com/anotherblog
    blog.domain.com/andanother

    What I'd like to do with multisite is setup those 3 blogs just like the other provider. This way the domain mapper plugin can map the site to their main blog subdomain, they can change their A records, and the move is all done. To do this, I would need to setup multisite as such;

    blog.mywordpress.com
    blog.mywordpress.com/anotherblog
    blog.mywordpress.com/andanother

    Unfortunately, I can't find any way of doing this in multisite. Each blog should be fully independent, but two should be hanging off subdirectories of the other.

  2. Multiple networks - http://wordpress.org/extend/plugins/wp-multi-network/ - is the 'normal' way people handle that.

  3. yep. make sure you have a sufolder setup then use one of the multi network plugins available and make a second network the subdomain.

  4. noctorum
    Member
    Posted 3 years ago #

    Using networks for wordpress I was able to setup the second site, however there was no prompting and seemingly still no option for blogs to be hosted off of a subdirectory?

  5. David Dean
    Member
    Posted 3 years ago #

    As Andrea mentioned, you need to set up your multisite install for subfolders in order to set up the structure you're describing. Probably too late to change that, but you might be able to get through it if you're handy with a MySQL client.

    And I don't know of any way to mix subdomain and subdirectory networks on the same install.

  6. Rod Whiteley
    Member
    Posted 3 years ago #

    The code makes it look like a "sub-folder" installation maps domains too. That is, it sets $current_blog based on $domain . $path not just based on $path. Am I interpreting it wrongly? I plan to try it for myself when I have the time.

  7. And I don't know of any way to mix subdomain and subdirectory networks on the same install.

    you use a subfolder install to start. then map subdomains.

  8. noctorum
    Member
    Posted 3 years ago #

    Even with multiple networks I'm unable to modify the new network to be a subfolder install. Is there a way to define SUBDOMAIN_INSTALL on a per network basis?

  9. David Dean
    Member
    Posted 3 years ago #

    you use a subfolder install to start. then map subdomains.

    That's not really a mixed install like noctorum is looking for. That's just multiple subfolder networks. And since his / hers was set up for subdomains, it doesn't really help.

    What I intended was a response to exactly this last question — I know of no way to define SUBDOMAIN_INSTALL on a per-network basis.

    You can try something with a sunrise file, or you can bite the bullet and try to convert your install to subfolders.

    Good luck! :)

    PS: And let us know how it goes!

  10. David ... So what you're saying is the same thing Andrea said?

    No one knows how to force sub NETWORKS to use Subdomains, so you should start with SubFolders. :)

  11. noctorum
    Member
    Posted 3 years ago #

    PS: And let us know how it goes!

    I've somewhat solved this with some apache rewrites. I'm convincing the customer to switch to subdomains in the future, and added;

    RewriteRule ^path1(.*)$ http://subdomain1.domain.tld$1 [L]
    RewriteRule ^path2(.*)$ http://subdomain2.domain.tld$1 [L]

    I attempted to keep the address bar the same by having these rewrites passed to mod_proxy via the P flag, but WordPress was extremely unhappy with that.

Topic Closed

This topic has been closed to new replies.

About this Topic