The MU forums have moved to WordPress.org

Use the /blog/ directory on sub-directories installation (10 posts)

  1. johndyer
    Member
    Posted 14 years ago #

    I am setting up a WPMU site where I want to use the /blog/ directory as a separate blog from the #1 blog. The #1 blog seems to own the /blog/ directory and I can't figure out how to disconnect if from that directory. I would be happy to just use the #1 blog, but the URLs don't quite work. Here's what I want to do

    http://site.com/ <-- custom home page (working great)
    http://site.com/someblog/ <-- (works great)
    http://site.com/blog2/ <-- (works great)
    http://site.com/blog/ <-- blog index (this always gives a 'page not found')
    http://site.com/blog/my-first-post <-- a post (this works with blog #1, but if I go to just plain /blog/ I get a 404)

    If I try to main the #1 blog post format something like /notblog/%postname%/ and then create another blog in the directory /blog/, the directory /blog/ doesn't work at all.

    So, is there any way either
    1) give the /blog/ directory to another blog or
    2) using blog #1, somehow enable the /blog/ directory not to give a "page not found" error and allow it to be distinct from the root.

    Thanks!

  2. cafespain
    Member
    Posted 14 years ago #

    I'll assume that you installed the WPMU code in the blog sub-directory and not the root then?

  3. johndyer
    Member
    Posted 14 years ago #

    No WPMU is installed in the root. Sorry for not mentioning that.

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Will you be using blog #1 as another blog, or you'll just be using it as a landing page for the site?

  5. johndyer
    Member
    Posted 14 years ago #

    andrea_r,
    I want the root (http://site.com/) to be a landing page for the entire site, then I want http://site.com/blog/ to be a normal blog index. It doesn't matter to me if http://site.com/blog/ is the #1 blog or another one I create, I just need to make sure that I can have a landing page at the root and blog index at /blog/.

    I can't figure out why when WPMU is installed at the root in sub-directories mode that the '/blog/' directory doesn't work (though posts urls like /blog/my-first-post/ work fine, you just can't pull off my-first-post/ and just view the /blog/ folder)

    Thanks!

  6. andrea_r
    Moderator
    Posted 14 years ago #

    It just uses /blog/ as a permalink off the main blog to stop interference from other sub-blogs.

    - create an empty page called "blog" on the main blog
    - go to Settings -> reading and under the section "Front page display", leave the one for "Front Page" alone, and then pikc the newly created "blog" page to show posts on. Save.

    Proof of concept: http://sillyandrea.com/blog/

    main MU install is at the root of that domain. Dang, I need to write this up, it totally worked... :D

    So you'll be posting on the main blog, with the posts showing up under /blog/ and for the main page, just whip up a home.php for whatever you want on the main page of the site.

  7. ciaravino
    Member
    Posted 14 years ago #

    I had the same problem. I tried what Andrea said but now when I go to my domain without a directory, it shows all the blog posts. I wanted to just have my home page as the landing page. But if I have the home page as the landing page then the /blog/ doesn't work. But /blog/index.php works ;(

  8. andrea_r
    Moderator
    Posted 14 years ago #

    You need to decide what else to show on the main page. make a file called home.php. Put your landing page stuff in there.

    Don't pick a static home page on that menu item, just the blog posts page. Or, make another static page with whatever content you want and set that to be the home.

  9. johndyer
    Member
    Posted 14 years ago #

    Andrea,
    Thanks for your help! Since I wanted the root (http://site.com/) to be different from the blog index (http://site.com/blog) I actually couldn't use the home.php approach since home.php showed up on both the root and blog page. So I created a page called /blog/ and a page called /home/, added a custom template to /home/ and then under Settings->Reading set /home/ as my home page and then /blog/ as the place to display my blog index.

    In the end you can see
    http://stage.squarerootofnine.com/
    and
    http://stage.squarerootofnine.com/blog
    doing just what we wanted.

    Now, I just need to finish the site! Thanks again!

  10. ciaravino
    Member
    Posted 14 years ago #

    I had to do it with the home.php page :( I guess I just won't be able to edit my homepage through WP. http://ciaravinodesign.com

About this Topic

  • Started 14 years ago by johndyer
  • Latest reply from ciaravino