Support » Fixing WordPress » url rewriting index.php to a Page

  • Resolved tikimaticdotcom


    well i’m trying to do is automatically redirect index.php to (example) ?page_id=3.
    i’ve tried htaccess stuff – did not work
    then i tried to replace

    <h2 class=”center”>Not Found</h2>
    <p class=”center”>Sorry, but you are looking for something that isn’t here.
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>

    which appears when there’s no post at all with

    header(“Status: 301 Moved Permanently”, false, 301);

    got an error like “header already defined”
    how could i do this? thanx for suggestions & help

    why doing this? huuurrhhhr…. think of me as the non-programmer freak trying to use WP (cos i love it) as a cms not as a blog (that is, with NO posts aaaarrgghhhh)

Viewing 6 replies - 1 through 6 (of 6 total)
  • I am not a programmer either but I helped somebody to make a website that was built exclusively by WP Pages.
    If you could describe more exactly what do you want to achieve, I might be able to understand 🙂 [don’t write code, just the idea]

    ok here’s the idea

    homepage of the site ( is a static splash-like one where you can choose beetween two languages. ok. let’s click “English”. That shall lead you to the English welcome page with an url like
    The problemo is: (which is indeed WP homepage) is empty – kind of a ghost page. So if a visitor unfortunately directly arrives to the index.php page (ex. thru google), i want him to be rediredted to the page_id=3.

    Here is what I’d do:
    Make a home.php template in your theme, it will always take precedence over index.php >> see Template_Hierarchy
    You can have any content you wish on that page, including links to Englsih or anything you code in.
    Even coming from google to “index.php” > they will see home.php.

    This is almost what you described, except the redirect, but if they don’t arrive ever to index, than you don’t really need it.

    If you have a home.php template, index.php will be used only for displaying archive and category view (if you don’t have an archive.php template) – and search results. Creating the proper templates, like archive.php, category.php, search.php, page.php you can style all of them as you want, without having to deal with index. Leave it there, though!

    1’000’000 thanx!

    The Static Front Page Plugin solves this out easy

    Another question..
    When somebody type the URL and press enter, the URL will be automatically goes to How will I do that? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘url rewriting index.php to a Page’ is closed to new replies.