Django middleware which redirects URL requests based on regex pattern matches