[wp-trac] [WordPress Trac] #7173: Improve SEO by redirecting
"index.php"
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 24 08:56:54 GMT 2008
#7173: Improve SEO by redirecting "index.php"
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.6
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
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. :)
{{{
if( $_SERVER[ 'REQUEST_URI' ] == '/index.php' ) {
header( 'Location: http://www.mysite.com/', 301 );
exit();
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/7173>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list