- May 1, 2010
- 2,442
- 470
Lets say i have domain http://example.com. In case google bot access my site i would like to serve example.com/main.html as home page. In all other cases home page should be as normal (accessed through http://example.com - default root pahe is index.php)
So far i come up with this:
Is that good?
So far i come up with this:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} .*Googlebot.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} googlebot^$
RewriteRule ^index.php http://example.com/main.html [R=301,L]
Is that good?