The MU forums have moved to WordPress.org

Front page (10 posts)

  1. sevaan
    Inactive
    Posted 17 years ago #

    I've got everything running, and have made a separate front page for the site, detailing what it's about and stuff. However,
    when someone visits, it still goes to the main page blog. How do I set it up so that when people go to my site, it will go to the index.php file I made instead of the first blog?

  2. sevaan
    Inactive
    Posted 17 years ago #

    index.htm, I mean.

  3. NetAndif
    Inactive
    Posted 17 years ago #

    You need to make a copy of index.php in wp-inst.
    Name it simlilar to your html file, e.g. frontpage.php.
    Edit this file, so that it fetches your frontpage.html file instead of index.html
    This should work.

  4. ajcannon
    Member
    Posted 17 years ago #

    How do I make the index.php fetch my homepage.htm? Where exactly do I modify the code to do this? Thanks so much for your help.

  5. Shelley
    Inactive
    Posted 16 years ago #

    I need to do this too. I'm a total novice, but I can edit a php file with explicit instructions. How exactly can I accomplish this?

  6. NetAndif
    Inactive
    Posted 16 years ago #

    Some things have changed in wpmu, so it doesn't use smarty templates no more.
    If you have a recent wpmu release, forget about what i wrote about 'fetching' html files.

    Just name your html file different from index, eg. 'homepage.html'.
    In addition, you would have to add an entry for this file to your .htaccess file, so it is redirected proberly.
    The additional entry may look like this:
    RewriteRule homepage.html /wp-inst/homepage.html [L]

    I hope this will work!

    Edit: I don't exactly know how the new (wp) templating engine works. But you could also edit your main blog template and make it the 'homepage' to achive the same!

  7. dronamraju
    Member
    Posted 16 years ago #

    To solve the original problem, (to have the home page be different than the first blog)

    1. Edit <your-wp-root-directory>/.htaccess
    2. Look for a rule that is like RewriteRule ^index.php /wp-inst/index.php
    3. Replace it with RewriteRule ^index.php /my-homepage.html

  8. Shelley
    Inactive
    Posted 16 years ago #

    Has anyone succeeded in using index.html rather than index.php? I've tried the suggestions in this and other threads on the same topic and the main blog just keeps coming up. Its awfully important to me to make this happen. Suggestions anyone?

  9. shinta
    Inactive
    Posted 16 years ago #

    This is how I did it, in two steps:

    1. In .htaccess, comment out:
    #RewriteRule ^index.php /wpmu/wp-inst/index.php [L]
    #RewriteRule ^([_0-9a-zA-Z-]+)/ /wpmu/wp-inst/index.php [L]
    #RewriteRule ^([_0-9a-zA-Z-]+) $1/ [R,L]

    2. Replace the code in wpmu/wp-inst/index.php with:
    $pages = array('/', '/?');
    $hosts = array('www.domain.com', 'domain.com');
    if (in_array($_SERVER[REQUEST_URI], $pages) && in_array($_SERVER['HTTP_HOST'], $hosts)) {
    $page = 'http://domain.com/index.php';
    header("Location: $page");
    }
    else {
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    }

    Step 1 gets rid of the index.php and catchall rewrites so you can use your own html, php, etc. files in your root dir.

    Step 2 handles the case where user doesn't enter any file, but simply "http://yourdomain.com". Getting rid of that rewrite from .htaccess will break your subdomain redirection, so you have to edit the index.php file to catch when the request is for http://www.domain.com or domain.com, while user.domain.com gets treated as normal.

  10. matt28
    Member
    Posted 16 years ago #

    hi. using the above method, i can't access the static pages, eg) http://www.domain.com/about/

    any reason why ? can this be fixed ?

About this Topic