Forums

[resolved] have the home address redirected to page 2 (3 posts)

  1. amazilia
    Member
    Posted 7 years ago #

    Hi,

    I use WP 1.5.2 with Sharepoint like 1.5 and without major modification that could alter the application.

    I had WP in a folder and the root file of the site (index.html) pointed at ./blog/?page_id=2 that was the home page of the site.

    I decided to move all the files from blog to the root of the site.
    now the root file is index.php leading to the blog and not the home page of the site.

    I tried to have a index.html file redirecting to index.php?page_id=2, but as in the option I have the WP address and the blog address setup to http://www.alcatorda.com. I end up with a loop between index.html and the WP address.

    how can I solve this problem ?

    thanks in advance

    Philippe

  2. ifelse
    Member
    Posted 7 years ago #

    The best way of solving this problem is by sidestepping your approach.

    In your theme folder (/wp-content/themes/sharepointlike/), make a copy of the index.php that is there and save it as home.php.

    At the very top of this file, add the following:
    <?php query_posts('page_id=2'); ?>

    There's more information on why this works via my various articles at http://ifelse.co.uk/tag/query_post

  3. amazilia
    Member
    Posted 7 years ago #

    It works !!

    great, thank you very much

    Philippe

Topic Closed

This topic has been closed to new replies.

About this Topic