# hapi-permanent-redirect

> Quickly set up permanent redirects in hapi plugin

Latest version **1.0.1** (published 2015-03-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hapi-permanent-redirect
pnpm add hapi-permanent-redirect
yarn add hapi-permanent-redirect
bun add hapi-permanent-redirect
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-03-23 |
| First published | 2015-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Peter Nagel |
| Maintainers | lob |
| Keywords | hapi, plugin, redirect |

## Links

- npm: https://www.npmjs.com/package/hapi-permanent-redirect
- Repository: https://github.com/lob/hapi-permanent-redirect
- Issues: https://github.com/lob/hapi-permanent-redirect/issues
- npm.io page: https://npm.io/package/hapi-permanent-redirect

## Dependencies (1)

- [joi](https://npm.io/package/joi.md) ^6.0.8

## Recent versions

- 1.0.1 (latest) — 2015-03-23
- 1.0.0 — 2015-03-23

## README

# Hapi Permanent Redirect
[![Build Status](https://travis-ci.org/lob/hapi-permanent-redirect.svg)](https://travis-ci.org/lob/hapi-permanent-redirect)
[![Coverage Status](https://coveralls.io/repos/lob/hapi-permanent-redirect/badge.svg?branch=master)](https://coveralls.io/r/lob/hapi-permanent-redirect?branch=master)
[![NPM version](https://badge.fury.io/js/hapi-permanent-redirect.svg)](https://npmjs.org/package/hapi-permanent-redirect)
[![Downloads](http://img.shields.io/npm/dm/hapi-permanent-redirect.svg)](https://npmjs.org/package/hapi-permanent-redirect)

The purpose of this plugin is to provide a convenient way to do permanent redirects.

# Registering the Plugin
```javascript
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

---
_Source: https://npm.io/package/hapi-permanent-redirect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
