1.0.1 • Published 9 years ago

hapi-permanent-redirect v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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