npm.io
1.0.1 • Published 11 years ago

hapi-permanent-redirect

Licence
MIT
Version
1.0.1
Deps
1
Vulns
2
Weekly
0
DeprecatedThis package is deprecated

Hapi Permanent Redirect

Build Status Coverage Status NPM version Downloads

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 a from and to key

Keywords