Is that possible to alter the request resource & parameters in pre-processing script?

were you able to figure out how to update request on pre process ?
I am also looking for same solution where I want to update request from images/20.jpg to images/unauthorized.png

thanx