Fix redirect for RESTful URIs