1.0.1 • Published 9 years ago
hapi-permanent-redirect v1.0.1
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) {
// An error will be available here if anything goes wrong
});
Options
redirects
Array of objects with afrom
andto
key