Hi,

Problem Summary:

I have uploaded both index.php and index.html pages on my blog. When I visit my-site.com I go to my-site.com/index.html which is correct according to the page priority which we have setup for default docuemnts. But when I visit my-site.com/index.php I always go to my-site.com/index.html which should not be happened.

Possible Solutions:
1) Firrst have a check with the .htaccess file for the index page rules and set the correct rules for index files. Make sure that there is no redirect rule set for index.php.
2) Please have a check with the canonical settings from wp-includes/canonical.php file. And replace the code as mentioned:

Original Code:
$redirect['path'] = preg_replace(‘|/index.php/$|’, ‘/’, $redirect['path']);

Replace With:
$redirect['path'] = preg_replace(‘|/index.php/*?$|’, ‘/’, $redirect['path']);

I have made the same changes in canonical.php and it has resolved the issue.

That’s it!

Thanks,

Shane G.

Popularity: 10%

Related posts:
  1. Case Study: Fatal error – Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line XX Hi, Problem Summary: Many wordpress users getting this error message...
  2. Case Study: 403 Error: You are not authorized to view this page Solution: Hi, Problem Description: In many cases when web user...
  3. Case Study: Page Displayed Too Long Case Study: Page Too Long I have one friend who...
  4. How To Display Sidebar At Index Page For Single Post? Hello All, In order to display sidebar at index page...
  5. How to edit the Index page for wordpress MU? How to edit the Index page for wordpress MU? You...

Leave a Reply

You must be logged in to post a comment.