Infocaster / UrlTracker

An Umbraco package that tracks 404 not found results and helps you redirect visitors to the right page
https://infocaster.net/wat-we-doen/umbraco-plugins/301-url-tracker
MIT License
17 stars 12 forks source link

Any url redirects to target after changing from regex to old url #106

Closed D-Inventor closed 1 year ago

D-Inventor commented 1 year ago

Describe the bug _Using version: 5.2.2 When changing a redirect from regex to old url, any url starts redirecting to this target

To Reproduce Steps to reproduce the behavior:

  1. Create redirect with regex
  2. Submit
  3. Edit redirect, remove regex and enter old url
  4. Submit
  5. See the issue

Expected behavior Only the url that matches the old url should redirect to the new url

Additional context This method here only filters out redirects where sourceregex is null. It should also filter out source regex with empty string. When editing redirects, empty strings should be converted to null

D-Inventor commented 1 year ago

This issue is fixed in 5.2.3. The issue does not apply to version 10 or 11.