10up / safe-redirect-manager

A simple HTTP redirection plugin for WordPress.
https://wordpress.org/plugins/safe-redirect-manager
GNU General Public License v2.0
314 stars 82 forks source link

Pattern match strips out forward slash. #381

Open EarthlingDavey opened 6 months ago

EarthlingDavey commented 6 months ago

Describe the bug

When using * to try and catch an optional slash and string, the slash is stripped from the replacement.

Steps to Reproduce

  1. Create a redirect with source /test*
  2. Regular Expressions false
  3. Redirect to https://google.com$1
  4. Visit /test/abc Expected destination is https://google.com/abc actual destination is https://google.comabc

Screenshots, screen recording, code snippet

NA

Environment information

NA

WordPress information

NA

Code of Conduct