Viewing 1 replies (of 1 total)
  • Thread Starter provdes

    (@provdes)

    For anyone else’s information I resolved the issue.

    I was using (.*) which matches any characters that fall after the specified partial URL.

    As my first partial URL ended with the number 1, it meant that this redirect still took hold for any other partial URLs that ended with a teen number as the second digit was being grabbed by the regex (.*)

    Fortunately in my case all my number in my URLs had a hyphen after them so all I had to do was make my initial partial URL a little more specific. So I changed it from:

    /index-pag-products-cid-1(.*)

    to

    /index-pag-products-cid-1-(.*)

    This made sure any URLs that contain teen numbers at the end of this portion are redirected where they should be…

    Boggled my brain for a few hours. Couldn’t see the wood for the trees…

Viewing 1 replies (of 1 total)

The topic ‘Problems with simple regex’ is closed to new replies.