WordPress.org

Ready to get started?Download WordPress

Forums

default Multisite redirect to one particular blog (8 posts)

  1. Florent
    Member
    Posted 2 years ago #

    Hi,
    I install wordpress multisite in Sub-directories mode.

    I don't want to use the default site "/" and want the root domain to show one particular blog (for example the "/2012" one).

    What is the right config ? an htaccess one or a wordpress network one ?

    Thanks
    Regards

  2. You can do it, but it can cause problems. Why not just use the default / site to show what you want, instead of switching?

  3. Florent
    Member
    Posted 2 years ago #

    No I want ot use each blog each year : I started with /edition2012/, so I want it to be my site by default.
    Next year it will be /edition2013/

    So, what is the solution and what are the risks ?

    Thanks

  4. Try changing define('BLOG_ID_CURRENT_SITE', 1); to the site you want to be #1

    That has had odd issues in the past with making new sites, they get made off of that site instead of the original, so they aren't easily visible on the back end.

  5. Florent
    Member
    Posted 2 years ago #

    Hi Ipstenu,

    I've made the change but this has no effect :(

    What about the line "define( 'SITE_ID_CURRENT_SITE', 1 );" ? I've tested also and nothing...

    Why the modification "define( 'BLOG_ID_CURRENT_SITE', 2 );" did no effect ?

    Is there another way ? in htaccess or header (some code to redirect to blog#2) ? That's critic for me and I have to put my website online this thursday ....

    Thanks.
    Regards.
    Florent

  6. Sorry, I forgot there were more, weird steps.

    1) Go in to Network Admin -> Sites and edit the site you want to BE the new 'main' domain so it's url is http://example.com (remove the subdomain or subfolder path totally). There's a checkbox to change site and home URL. Make sure that's checked before you hit save.

    2) Change the define('BLOG_ID_CURRENT_SITE', 1); to whatever you want. Save it, upload it. DO NOT CHANGE SITE ID, YOU WILL BREAK THINGS.

    3) Go BACK to Network Admin -> Sites and edit the site of the 'OLD' main site. Edit it so it HAS a subfolder pathing. /edition2011/ or whatever you want. Make sure the checkbox is checked. Save it.

    Should work.

  7. Florent
    Member
    Posted 2 years ago #

    Hi,

    Thanks for your anser but I want to keep my /edition2012/, so i just want my "/" to redirect to my /edition2012/.

    I tested two different solutions :
    - in my home.php of the default blog, I use a file_get_contents to get the /edition2012/ html and echo it.
    - I redirect in 301 from my default blog home.php file to "/edition2012/"

    What did you think about this ? I'm afraid that :
    - the first solution lose browser tests for the display
    - for the second solution, google may keep /edition2012/ as my home page and perhaps will not see my /edition2013/ next year ?

    Thanks.
    Regards.
    Florent

  8. Thanks for your anser but I want to keep my /edition2012/, so i just want my "/" to redirect to my /edition2012/.

    Uh. Huh.

    I'd do the 301 or just put up a splash page.

Topic Closed

This topic has been closed to new replies.

About this Topic