---
lang: en
title: 'API docs: rest.redirectroute.(constructor)'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.redirectroute.(constructor).html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RedirectRoute](./rest.redirectroute.md) &gt; [(constructor)](./rest.redirectroute.(constructor).md)

## RedirectRoute.(constructor)

Constructs a new instance of the `RedirectRoute` class

<b>Signature:</b>

```typescript
constructor(sourcePath: string, targetLocation: string, statusCode?: number);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  sourcePath | <code>string</code> |  |
|  targetLocation | <code>string</code> |  |
|  statusCode | <code>number</code> |  |


