1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Internal duplicate content from same url

Discussion in 'Black Hat SEO' started by snipez264, Mar 5, 2016.

  1. snipez264

    snipez264 Registered Member

    Feb 4, 2012
    Likes Received:
    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 [​IMG]
  2. skyflash

    skyflash Jr. VIP Jr. VIP

    Jan 28, 2014
    Likes Received:
    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]