PHP code example of settermjd / redirect-to-new-domain-middleware
1. Go to this page and download the library: Download settermjd/redirect-to-new-domain-middleware library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
settermjd / redirect-to-new-domain-middleware example snippets
[
'path' => '/',
'middleware' => [
Settermjd\Middleware\RedirectToNewDomainMiddleware::class,
App\Handler\HomePageHandler::class,
]
'allowed_methods' => ['GET'],
],
$app->pipe(Settermjd\Middleware\RedirectToNewDomainMiddleware::class);