---
url: >-
  https://lit-ui-router.dev/reference/ui-router-server/prerender/interfaces/RedirectPagesOptions.md
---
[ui-router-server](../../index.md) / [prerender](../index.md) / RedirectPagesOptions

# Interface: RedirectPagesOptions

Defined in: [redirect-pages.ts:11](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirect-pages.ts#L11)

Options for [redirectPages](../functions/redirectPages.md).

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
|  `base?` | `string` | The url path `outDir` is served at, `prerender`'s [base](PrerenderOptions.md#base) by default. Each line's `from` must lie under it; the page lands at the rest of the path. | [redirect-pages.ts:17](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirect-pages.ts#L17) |
|  `page?` | (`line`) => `string` | `Promise`<`string`> | Builds each page's HTML from its line, [redirectPage](../functions/redirectPage.md) by default. Wrap that to add to the page, or replace it. `to` arrives unescaped: HTML-escape it in markup, with `escape-html` (a dependency of this package) or your template's own escaper, and escape it as a script string too if it goes in a script. | [redirect-pages.ts:31](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirect-pages.ts#L31) |
|  `redirectsFile?` | `boolean` | Also writes the `_redirects` file, for a site deployed both to a host that reads it and to one that doesn't. The host that reads it answers with the line's status before the page is reached. | [redirect-pages.ts:23](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirect-pages.ts#L23) |
