The MU forums have moved to WordPress.org

how to co-exist with old site's index.php file? (8 posts)

  1. mdunlap
    Member
    Posted 17 years ago #

    I installed MU in the root directory, and I'm using subdomains.

    I want to use the old index.php file so when people go to http://www.domain.com they get my old site, but if they go to subdomain.domain.com, if there is a blog, then they see the blog.

    Is it possible to rename the index.php file for MU to index_blog.php, and then in the htaccess file, script it so if www is sent, it goes to index.php, and if anything else it goes to index_blog.php?

    am I on the right track?

  2. zeug
    Member
    Posted 17 years ago #

    Nope, you're just asking for a world of pain.

    You can however make a page template in the home theme, chuck all your old code in that, then call it from a static page in the root Mu blog and set that as your front page in Options>Reading. Works fine for me.

  3. nexia
    Member
    Posted 17 years ago #

    the main front page of WPMU is not the main index.php file for all blogs... it's the front page for the login form as you know it... that login form can be anything, even your old index.php ... just put a link to wp-login.php or wp-register.php and that's all... they will be able to register their own blogs in sub-domains if you set it so.

  4. zeug
    Member
    Posted 17 years ago #

    ummm ... Nexia do you mean write over index.php in the Mu root? I really don't think you want to go messing with that. Just use the root blog itself in wp-content/themes/home to present the old front end stuff. Is easily done and really no different from using normal WordPress as a back end for old sites.

  5. nexia
    Member
    Posted 17 years ago #

    hum, you are right zeug... i just forgot to mention it was related to the file home.php...

    damn, when a real FAQ is put in place here.. these questions are asked 10 times per day

  6. pumpkinslayer
    Member
    Posted 17 years ago #

    Edit the theme.

    The one you see as standard is just a standard theme for wpmu that has a signup form built in.

    You can use any theme you wish, just like with regular wordpress.

  7. mdunlap
    Member
    Posted 17 years ago #

    I ended up editing the home.php file, and I will continue on to th wp-signup, and the not found page...I was afraid it would be very had to organize all the links from my old page. I just copied the old index page to home folder, renamed it home.php and it worked...

    I was playing with the htaccess file...what a pain..

    if not www, go to blog sites.
    if not www, and not existing blog, go to this file.
    if www go to index.php

    sounds simple here, but when I tried putting that in the htaccess file...problems

  8. zeug
    Member
    Posted 17 years ago #

    yeh the theme templates are totally flexible, I use page templates including home.php to add, customize and update site pages as needed, you don't even need to include any WP or Mu specific code in there on the root blog at all although adding the loop into a page template lets you edit its content from manage>pages.

About this Topic