added redirect (301/302) support