Redirecting WordPress index.php to root
April 20th, 2008If you check the Page Rank of http://bloke.org against http://bloke.org/index.php, which are both, to a human, obviously the same page you’ll see two different results. My domain carries a PR3 whilst the latter carries a PR0.
We know they are both the same, but do the crawlers? No, they don’t.
Without rambling about Google Page Rank and other such randomly generated statistics, your site or blog may be displaying what the search engine crawlers think is duplicate content.
Luckily, there is a clever fix. Modify the following code and drop it in your .htaccess file for no-duplicate-content-for-the-crawlers-niceness.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://bloke.org/ [R=301,L]
Simple as simple gets.
| Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo |
Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Apache, Linux, Search Engines, Wordpress category.