Skip to content

Pattern match strips out forward slash. #381

@earthlingdavey

Description

@earthlingdavey

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn’t working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions