• Resolved burningthumb

    (@burningthumb)


    Hey Guys,

    I’m transitioning to wordpress from a previous version of my site and I still have pages that link to the index.html page.

    I noticed that with the Corpo theme when mysite.com/index.html is requested I get the 404 page. Not so good.

    So I added the following to the 404.php file in the Corpo theme – which fixes it for me but maybe there is a better permanent solution for your theme?

    <?php
        if ($_SERVER['REQUEST_URI'] == '/index.html') { header("Location: https://mysite.com/"); exit; }
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • There are numerous redirect plugins that you can use also. I would aim for doing a permanent 301 redirect to do this. You can just search for “permanent 301 redirect wordpress plugin” and pick one to use.

    Thread Starter burningthumb

    (@burningthumb)

    Hey Aaron,

    Thanks! This is, of course, a much better solution and will help me migrate all of my old pages seamlessly.

    No problem. It is the “correct” way to do it in terms of SEO value also.

    Good luck.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Corpo and 404 error on index.html’ is closed to new replies.