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:

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:

The tool is located here:

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} ^ [nc]
RewriteRule ^(.*)$$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.