Internal duplicate content from same url

snipez264

Registered Member
Joined
Feb 4, 2012
Messages
57
Reaction score
6
Hey guys does anyone know how to remove duplicate content from almost the SAME url.

(These are not the real urls obvs)

1. http://domain.com/article
2. http://domain.com/article/ ( This is the url I want to display the content )

How do I remove the first link so it does not show the content ( it is missing a '/' ) because it is causing the duplicate content error

Thanks for any assistance
smile.png
 
If you redirect all pages with a trailing slash to an URL without trailing slash, the following code will do this for you:
using .htaccess file on Linux server, use the following code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^\.localhost$ [NC]
RewriteRule ^(.+[^/])/$ http://%{HTTP_HOST}/$1/ [R=301,L]
 
Back
Top