Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Pattern Matching %20 in url

I have several urls that have %20''s in the actual url.  I want a regex that will point it to the correct page.  I can get it to work with the first 3 letters but don't know how to add in the %20.  I have tried \W and \s but to no avail.

If it is working correctly then a url with function.php shouldn't be matched.

This is an example url in question.
funct%20in%20/var/www/html/modules/cdseolinks/function.pa%20in%20/var/www/html/modules/cdseolinks/function.parse-url

Here is what I have.

RedirectMatch 301 ^/fun\s(.+?)$ /help.php

By the way, the ideal thing I know already but I don't have any support on that program to know how to fix the problem.  So that is why I am resorting to a pattern match.  Rather than getting the program to quit putting the erroneous characters into the urls when it is spidered.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Angelp1ay
Angelp1ay
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharingsunshine

ASKER

that matches the %20 perfectly and /or a space.  So that is great.
I appreciate your help.
No problem :) Have a lovely weekend!
You too!