Improve SEO by redirecting "index.php"

Description

If pretty permalinks are enabled, it can be assumed that http://site.com/index.php isn't needed. Therefore we should redirect all index.php requests to the home URL to avoid duplicate content issues. Plus it just looks better.

This should of course have an internal filter or something for those running crazy setups.

I've stuck this in my wp-config.php, but it'd nice to have it in the core. :)

Change History (6)

This was in canonical.php, but a certain setup was having issues (it reported /index.php even when viewing /, causing infinite redirects), so I rolled it back. The host in question was notified. We can fix this for 2.7 -- at the beginning of the cycle.