diff options
Diffstat (limited to 'engine/RedirectResponse.php')
-rw-r--r-- | engine/RedirectResponse.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/RedirectResponse.php b/engine/RedirectResponse.php new file mode 100644 index 0000000..7900229 --- /dev/null +++ b/engine/RedirectResponse.php @@ -0,0 +1,11 @@ +<?php + +class RedirectResponse extends Response { + + public function __construct(string $url) { + parent::__construct(301); + $this->addHeader('HTTP/1.1 301 Moved Permanently'); + $this->addHeader('Location: '.$url); + } + +}
\ No newline at end of file |