Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla 2 .htaccess

derekdonderekdon New
edited January 2010 in Vanilla 2.0 - 2.8
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.