forked from spatie/laravel-missing-page-redirector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmissing-page-redirector.php
29 lines (25 loc) · 1008 Bytes
/
missing-page-redirector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
return [
/*
* This is the class responsible for providing the URLs which must be redirected.
* The only requirement for the redirector is that it needs to implement the
* `Spatie\MissingPageRedirector\Redirector\Redirector`-interface
*/
'redirector' => \Spatie\MissingPageRedirector\Redirector\ConfigurationRedirector::class,
/*
* By default the package will only redirect 404s. If you want to redirect on other
* response codes, just add them to the array. Leave the array empty to redirect
* always no matter what the response code.
*/
'redirect_status_codes' => [
\Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND
],
/*
* When using the `ConfigurationRedirector` you can specify the redirects in this array.
* You can use Laravel's route parameters here.
*/
'redirects' => [
// '/non-existing-page' => '/existing-page',
// '/old-blog/{url}' => '/new-blog/{url}',
],
];