a matter of taste, but lets return early here

```php
if (!module_exists('redirect')) {
  return;
}

if ($http_response_code != 301) {
  return;
}
```

IMO, it makes it more readable.