.htaccess - htaccess redirection for a pattern -
i searched solution of issue , tried several ways none of them worked.
i migrating website new system , want change url structure too. couldnt find solution 1 of them important one.
it e-commerce site. product page urls had domain.com/product/productname/ in previous system , need them go domain.com/productname.html . product part should catched , redirected version without product/ .
might simple couldnt find solution that.
thanks in advance
cheers
you can use simple rule in site root .htaccess:
redirectmatch 301 ^/product/([^./]+)/?$ /$1.html
Comments
Post a Comment