Forums

The WordPress MU forums have moved to the MultiSite forum on WordPress.org

Custom domain and subdir for a blog (11 posts)

  1. eitch
    Member
    Posted 1 year ago #

    Hi,

    I tried to create a custom domain for a blog here, and it almost worked. In this try, I used a wordpress installation on a domain called example.com, using Wordpress MU. Then I went to "Administration -> Blogs -> Edit Blog" and used:

    Domain: otherexample.com
    Path: /news/blogtest/

    Then I configured Apache to answer from both domains to the same wordpress mu installation. It didn't work at all, instead it redirected to the main page (http://example.com/)

    In another try, i used:

    Domain: otherexample.com
    Path: /blogtest/

    And it worked. The blog is now functional in http://otherexample.com/blogtest/. My conclusion is that when I use more than one level of subdirectories, it won't work. I checked mod_rewrite rules and I think it's not related with this... Is wordpress controlling this? I appreciate any ideas :)

    Thanks.

  2. andrea_r
    Moderator
    Posted 1 year ago #

    Use a plugin designed to do this for you. :)

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    you'll still need to do the Apache bit though, so the server answers requests for doamin2 and sends it to the MU install.

  3. eitch
    Member
    Posted 1 year ago #

    Hi andrea, thanks for the reply, but this is not quite what I need... I tested this plugin and it binds a blog to another domain. I need something to bind the blog to another domain and path. This worked fine when I changed both domain and path on "Edit Blog" screen, but only if Path has one dir-level.

    Works: /blogtest/
    Don't Work: /news/blogtest/
    Don't Work: /blogs/blogtest/
    Don't Work: /news/sports/blogtest/

    I don't know if this is a bug, mod_rewrite feature, or an app limitation :(

  4. andrea_r
    Moderator
    Posted 1 year ago #

    Not a bug, a limitation.

    what you're trying to do is.... confusing, to say the least. To get the rest of the folders, you shoudl be able to map the domain to the top level of the blog itself, and use the rest as categories or something as you normally would in wordpress.

    Or are you trying to categorize blogs on different domains?

  5. eitch
    Member
    Posted 1 year ago #

    Hummm, let me try to explain it better...

    Today I have a single Wordpress MU hosting 50 blogs in a common domain, let's say: http://blogs.example.com. My installation mode is per sub-dir, so the blogs are:

    http://blogs.example.com/person/
    http://blogs.example.com/blogtest/
    http://blogs.example.com/theone/
    and so on.

    Now I have a demand here, instead of using the blogs on this domain, I need to "map" each blog to a different domain, organized on a sub-dir structure "per subject". Examples:

    http://news.example.com/sports/person/
    (Was: http://blogs.example.com/person/, the content of this blog is mainly news, about 'sports', hence the new url)

    http://news.example.com/global/blogtest/
    (Was: http://blogs.example.com/blogtest/, the content of this blog is mainly news, about global facts, hence the new url)

    http://entertainment.example.com/theone/
    (Was: http://blogs.example.com/theone/, the content of this blog is mainly entertainment, hence the new url, but now without a 'category' sub-dir).

    Each one of these new "mapped domains" are the root of the blog. I can accomplish this installing separate instances of Wordpress, but this would kill the main Wordpress MU advantage (multiple users for multiple blogs in a single installation).

    When I edit the blogs, there's an option for each one of the blogs, to change the "Domain" and "Path" URL location of a blog. It also sets home and site_url on the database. This change isn't working like I said before...

    I think it's a limitation of Wordpress, and that's because I'm trying to gather information about it. Maybe I'll need some type of customization like the domain mapping plugin, but instead of mapping to a specific domain, I have to map to a specific domain *AND* sub-directory (not limited by number of sub-dirs, like I said in the examples).

    Hummm, I think I made it more clear, if not please say and I will be glad to explain more :)

  6. eitch
    Member
    Posted 1 year ago #

    Sorry for being annoying, but anyone knows a direction for this? Maybe some documentation how it works... If this does not work out-of-the-box, I'll have to create code for this! :)

  7. andrea_r
    Moderator
    Posted 1 year ago #

    Yeah, you'll have to write something to get the extra folder structure (faux-lders? ;P ) in there.

  8. eitch
    Member
    Posted 1 year ago #

    hi andrea! I have come across your multi-site plugin (http://wpmututorials.com/simple-multi-site-plugin-e-book/) and maybe it can do what I want?

  9. andrea_r
    Moderator
    Posted 1 year ago #

    No, or I would have suggested it. :)

    Unless you physically want a set up at http://news.example.com/sports and then have blogs under that like http://news.example.com/sports/person/.

  10. eitch
    Member
    Posted 1 year ago #

    Hummm... Let me see the options... And if I wanted the same sub-directory on multiple domains? Like:

    http://news.example.com/blogs/oneguy/
    http://news.example.com/blogs/person/
    http://news.example.com/blogs/onegirl/
    http://sports.example.com/blogs/soccer/
    http://sports.example.com/blogs/basketball/
    http://entertainment.example.com/blogs/cine/
    http://entertainment.example.com/blogs/games/

    with one installation and your plugin, it works? :) I also heard about a Multi-Site Manager plugin...

    Thanks!

  11. andrea_r
    Moderator
    Posted 1 year ago #

    You can't use any of the plugins out there and get them to include a folder name.

    If you went the multisite route, you;d have to create a site at
    - http://news.example.com/blogs/
    and at
    - http://sports.example.com/blogs/
    and at
    -http://entertainment.example.com/blogs/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.