WordPress.org

Support

Support » Multisite » Domain Mapping – Mixing Subdomain and Subdirectory

Domain Mapping – Mixing Subdomain and Subdirectory

  • 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Multiple networks – http://wordpress.org/extend/plugins/wp-multi-network/ – is the ‘normal’ way people handle that.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

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

    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?

    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.

    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.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    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.

    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?

    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!

    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. 🙂

    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Domain Mapping – Mixing Subdomain and Subdirectory’ is closed to new replies.
Skip to toolbar