Viewing 1 replies (of 1 total)
  • It’s working correctly. The problem is that your target URL is also a match for your your source regex, so it just keeps on redirecting.

    Play around with this test tool:
    https://regex101.com/

    Think about the possible permutations of the url you want to match and type them in the “Test String” section (leave off your domain), and put your target url in the “Substitution” section.

    For example, \/author\/(\w*)$ will match “/author/my_userNAME” and will not match the redirected “/author/my_userNAME?type=ads”.

    But you also have to think about things like: What characters are allowed in my author names? Do I need to account for trailing slashes? etc., account for those cases in your Test Strings, and rework your regex as needed.

    • This reply was modified 6 years, 9 months ago by CEMBTW.
Viewing 1 replies (of 1 total)
  • The topic ‘Loop problem with Regex’ is closed to new replies.