Fixed redirect-Handling (HTTP codes were wrong)