Strip parent categories from url
snippet in htaccess

Strip parent categories from url

user5679

RedirectMatch 302 ^/([\w-]+)/(?:[\w-]+/)+([\w-]+)$ https://newdomain.com/$1/$2