Change order of comparsions and header check

This could speed up most common case (2xx response)
Merge pull request #25 from floatdrop/rewrite-redirect-condition

Change order of comparsions and header check