Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Tzeapa

    (@tzeapa)

    I’ve done all of the above (except for some-article/1 to some-article redirect) using this inside .htaacces

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} (.*)$
    RewriteRule ^(.+)/$ http://domain.com/$1 [R=301,L]

    Now I only need to redirect http://domain.com/some-article/1 to http://domain.com/some-article

    You may give a plugin called Redirection a try. it is not great if you have a very large number (hundreds) of redirects…but it is a very good plugin.

    Good luck
    🙂 tom

    Thread Starter Tzeapa

    (@tzeapa)

    I already managed to find a solution 😀

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} (.*)$
    RewriteRule ^(.+)/1$ http://benchmark3d.com/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} (.*)$
    RewriteRule ^(.+)/1/$ http://benchmark3d.com/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} (.*)$
    RewriteRule ^(.+)/$ http://benchmark3d.com/$1 [R=301,L]

    Just Trial end Error

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘301 Redirect Duplicate Content’ is closed to new replies.