hapi-permanent-redirect
1.0.1 • Public • Published Hapi Permanent Redirect
The purpose of this plugin is to provide a convenient way to do permanent redirects.
Registering the Plugin
var Hapi = require('hapi');
var server = new Hapi.Server();
server.register([
{
redirects: [{
from: '/route1',
to: 'route2'
}, {
from: '/route3',
to: '/route4'
}]
}
], function (err) {
});
Options
redirects
Array of objects with a from
and to
key
Package Sidebar
Install
npm i hapi-permanent-redirect
Weekly Downloads