Reputation:
I'm running a website hosted on Apache and Plone (based on Zope). My problem is that i have duplicate content with following urls:
www.site.com www.site.nl/en www.site.com/nl
and so on, every page shows the same content.
Google Webmaster Tools also reports sites in the following format to be duplicate:
www.site.nl/news www.site.nl/news/
Notice the trailing slash.
What's the best way to solve this (make a 301 redirect to the proper url)? Can i do this in the Plone source? Or should i use the canonical tag?
Regards
Upvotes: 1
Views: 1402
Reputation: 13634
Best place to solve it is in your apache configuration.
For (1), use this as an example:
<VirtualHost *>
ServerName www.reinout.vanrees.org
Redirect permanent / http://reinout.vanrees.org/
</VirtualHost>
For (2): you probably have big "virtualhostmonster" rewriterule at the end of your apache config. Copy/paste that line and use ^(.*)/$
instead of ^(.*)
in the first one. That effectively strips trailing slashes.
Upvotes: 2