• Resolved maidanet

    (@maidanet)


    Often times, when I am setting up a new website, I will put an “under construction” page at index.htm

    Then I install WordPress and can go directly to it by using index.php to view the pages.

    This has been working great for me for years.

    Now that I have installed 2.7, when I type index.php, it automatically directs me back to the root and the .htm file.

    This makes things difficult for testing.

    How can I allow access to both files without the index.php file being redirected to the root?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    You can remove the canonical redirection by adding something like this to your theme’s functions.php file.

    remove_action('template_redirect', 'redirect_canonical');

    Note that you don’t want to leave it this way permanently, it’s bad for SEO to have the wrong URLs returning results. Duplicate content and all that.

    Thread Starter maidanet

    (@maidanet)

    Thank you so much, Otto42. That works perfectly.

    It will be only temporary, until the site is approved and ready to go live.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allow both index.php and index.htm to be accessed’ is closed to new replies.