a new recipe for rewrite url and basic authentication