WordPress.org

Ready to get started?Download WordPress

Forums

Redirecting index.html to index.php (2 posts)

  1. madinkbeard
    Member
    Posted 8 years ago #

    I've searched for an answer to this, but nothing seems to work. I just installed WordPress into the main directory of a site. I've got everything working fine. I've even redirected the old RSS feed successfully, but I cannot get mystie.com/index.html to redirect to mysite.com/index.php

    Going to mysite.com successfully leads to mysite.com/index.php but mysite.com/index.html gives me the WordPress error page.

    I tried a number of mod_rewrite rules in my htaccess file but none seem to work.

    I tried this based on a mod_rewrite tutorial:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteRule ^index\.html$ /index.php
    RewriteRule cbgfeed.rss$ http://comicbookgalaxy.com/?feed=rss2 [R]
    </IfModule>

    # END WordPress

    The last rewrite in there is working, but the previous to last does not.

    Can anyone help? I'd really appreciate it.

    Thanks.
    Derik.

  2. madinkbeard
    Member
    Posted 8 years ago #

    Whoops, I called for help too soon.

    By leaving the index.html file in place and changing the rewrite to:

    RewriteRule ^index\.html$ mysite.com/index.php

    It now works. Interesting.

Topic Closed

This topic has been closed to new replies.

About this Topic