Pattern Matching Issue

I have this url I need to regex to another link.  Here is the original link.

Tei%20Fu%20&%20Peppermint%20Oils%20w/%20Carrying%20Case_p_814.htm

Here is what I have tried
RedirectMatch 301 ^/Tei((%20)|[\s\w\/\.\-])Fu((%20)|[\s\w\/\.\-])&((%20)|[\s\w\/\.\-])Peppermint((%20)|[\s\w\/\.\-])Oils((%20)|[\s\w\/\.\-])w/((%20)|[\s\w\/\.\-])Carrying((%20)|[\s\w\/\.\-])Case_p_814\.htm$ /product.php?productid=56

In the browser it defaults to a discontinued page with this url
http://www.abc.com/tei-fu-peppermint-oils-w-carrying-case.html

Please tell me how to fix this?

Randal
sharingsunshineAsked:
Who is Participating?
 
Derek JensenConnect With a Mentor Commented:
Are you escaping all of your forward slashes?
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
%20 is a space, %2d is a hyphen, try substituting %20 with %2d in your pattern.
0
 
sharingsunshineAuthor Commented:
I changed the %20 to %2d but it didn't make any difference.  I think the problem may be with the w/ in the url. But I am not sure how to escape  it properly.  Between the word Oils and Carrying.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
Derek JensenCommented:
A backslash:
w\/

And yeah, stick with the %20, as that's how .htaccess sees it. :-)
0
 
sharingsunshineAuthor Commented:
I stuck with the %20 and fixed the w\/ but it still won't match.  So can you see what the problem is?
0
 
sharingsunshineAuthor Commented:
thanks, that did it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.