Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

Who's Online 16

6apxatCurtisOdenconnectrleafmonstersarowlwp422 +10 guests

Vanilla 2 .htaccess

I was using a duplicate content checker earlier and noticed some errors in relation to .htaccess options. To be honest I'm not really sure if this is a real problem, but perhaps one of the core developers could check and let me know.

Error results example:
WWW/NonWWW Header Check: FAILED
Your site is not returning a 301 redirect from www to non-www or vice versa. This means that Google may cache both versions of your site, causing sitewide duplicate content penalties [SHOW | HIDE].

Default Page Check: FAILED
You have not standardized your default pages meaning the following versions of your url return a 200/OK Header, which may cause duplicate content issues. The following extensions work:
http://www.example.com/index.html
http://www.example.com/index.htm
http://www.example.com/index.asp
http://www.example.com/index.aspx
http://www.example.com/default.asp
http://www.example.com/index.php
http://www.example.com/

404 Check: FAILED
You are not returning a 404 error on non-existent pages. This means google could cache a large number of useless, duplicate pages on your site. Example:
http://www.example.com/afgahsdfjkahsdfjkasdhfjaksdhfasdjf.html

The tool is located here: http://www.virante.com/seo-tools/duplicate-content.php

My .htaccess file originally looked like this (vanilla 2 default):

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]


I since added these lines:
RewriteCond %{http_host} ^example.com [nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]

... which resolved the first error but not sure if I have positioned them right as now when the www is omitted it adds index.php to the url which I don't like as it's not needed.

Anyone got any ideas?
Sign In or Register to comment.