Redirecting WordPress index.php to root
Posted on April 20, 2008
If 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.
Related posts:
- CubeCart and Wordpress Integration
Following my 100% CubeCart orientated posts, here's another late night hack. It integrates a Wordpress... - Block Countries in Apache
Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines... - Page Rank Updates
Looks like Google have updated their Page Rank recently. My index page has increased from... - SEO Friendly URLs for CubeCart in Windows
I have a client hosting CubeCart on a Windows server. Unfortunately the built in Apache... - Single Line Wordpress Install
I'm getting a pro at installing Wordpress now.I'm trying to cut down my install time...
What this article 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.