I'm looking for a way to redirect any url I visit on my computer (Mac), say
www.example1.com/a/b/[\d]+, to another url
www.example2.com/a/[\d]+. I don't want this to be on the IP level, just for that particular URL matched by a regular expression.
/etc/hosts was my first idea, but unsure how to do the regex match to capture the numbers and pass it to the second URL defined.