rkingon / Craft-Plugin--Redirect-Manager

MIT License
46 stars 16 forks source link

Wildcard search improvements #26

Open davidteal opened 7 years ago

davidteal commented 7 years ago

Hi there.

As far as I can see, I don't think wildcard searches work on urls with a query string as the preg_match tries to use the ? as part of the expression. I fixed this by escaping ? characters in the str_replace.

Also, using as the start of the redirect doesn't work due to using `strpos($record['uri'], "")which returns 0 and therefore doesn't pass the if statement. Should usestrpos($record['uri'], "*") !== false`

Happy to submit PR