Problem: inbound outdated links to products that have been discontinued. Challenge: many variations with additional keywords, subcategories, etc.
Examples:
Needed solution: something that will catch the keyword "OLDNAME" *regardless of what it's surrounded by, and redirect to a specific page.
E.g. "RewriteRule ??????? OLDNAME ?????? http://www.example.com/newpage [L,NC,R=301]
The bold part is what I need help with.
Thanks in advance!
Try
RewriteRule ^.*(OLDNAME|ANOTHEROLDNAME).*$ http://www.example.com/discontinued [L,NC,R=301]
it lookups any given word at any position in the given url.