puntable
puntable

Reputation: 337

Redirect to root in .htaccess

In old site i have all my product categories in a category called /webshop/.

I want to strip out the /webshop/ in URL and redirect to root with a 301, because i have removed the "webshop" category.

Example.

Old site:

www.site.com/webshop/shoes.html

New site:

www.site.com/shoes.html

It needs to be generic so it works for all my categories. Only categories needs to be redirected like this, because my products dont have category path in URL.

This is a Magento webshop.

Upvotes: 1

Views: 57

Answers (1)

Jake Bathman
Jake Bathman

Reputation: 1278

Give this a try:

RedirectMatch 301 /webshop/(.*) /$1

Add that to your .htaccess file and report back.

Upvotes: 1

Related Questions