optionally pass permanent? to redirect for a 301 rather than 302 redirect