Search code examples
.htaccesshttp-redirecturl-rewritingseohttp-status-code-301

301 Redirection Without SEO Damage


I need to change some of my URL's without any SEO problem / damages. (i will delete all my old urls from google database)

For example,

old url: www.site.com/search/term.html

new url: www.site.com/tag/term.html

my htaccess file contains this line:

RewriteRule ^search/(.*).html index.php?do=search&keyword=$1

how must i change this? (i must be carefull about seo damages)

like this, or???

RewriteRule ^search/(.*).html index.php?do=search&keyword=$1
RewriteRule ^search/(.*).html /tag/$1.html [R=301,L]

Solution

  • If I get this, you want the /tag/ URLs to do the search and redirect the /search/ URLs to them.

    RewriteRule ^tag/(.*).html index.php?do=search&keyword=$1
    RewriteRule ^search/(.*).html /tag/$1.html [R=301,L]