# lws-rewrite

> lws middleware plugin adding URL rewriting support

Latest version **4.0.0** (published 2024-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install lws-rewrite
pnpm add lws-rewrite
yarn add lws-rewrite
bun add lws-rewrite
```

Provides the command `lws-rewrite`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2024-07-25 |
| First published | 2017-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12.17 |
| Dependencies | 5 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Lloyd Brookes |
| Maintainers | 75lb |
| Keywords | lws, lws-middleware, url, rewriting, rewrite, proxy |

## Links

- npm: https://www.npmjs.com/package/lws-rewrite
- Repository: https://github.com/lwsjs/rewrite
- Homepage: https://github.com/lwsjs/rewrite#readme
- Issues: https://github.com/lwsjs/rewrite/issues
- npm.io page: https://npm.io/package/lws-rewrite

## Dependencies (5)

- [koa-route](https://npm.io/package/koa-route.md) ^4.0.1
- [array-back](https://npm.io/package/array-back.md) ^6.2.2
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^6.2.2
- [http-proxy-agent](https://npm.io/package/http-proxy-agent.md) ^5.0.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2024-07-25
- 3.1.1 — 2020-06-11
- 3.1.0 — 2020-05-23
- 3.0.1 — 2020-03-04
- 3.0.0 — 2020-02-09
- 2.1.0 — 2020-02-04
- 2.0.10 — 2019-10-21
- 2.0.9 — 2019-09-14
- 2.0.8 — 2019-07-24
- 2.0.7 — 2019-07-22
- 2.0.6 — 2019-07-22
- 2.0.5 — 2019-06-27
- 2.0.4 — 2019-06-18
- 2.0.3 — 2019-06-09
- 2.0.2 — 2019-06-09
- … 19 more at https://npm.io/package/lws-rewrite/versions

## README

[![view on npm](https://badgen.net/npm/v/lws-rewrite)](https://www.npmjs.org/package/lws-rewrite)
[![npm module downloads](https://badgen.net/npm/dt/lws-rewrite)](https://www.npmjs.org/package/lws-rewrite)
[![Gihub repo dependents](https://badgen.net/github/dependents-repo/lwsjs/rewrite)](https://github.com/lwsjs/rewrite/network/dependents?dependent_type=REPOSITORY)
[![Gihub package dependents](https://badgen.net/github/dependents-pkg/lwsjs/rewrite)](https://github.com/lwsjs/rewrite/network/dependents?dependent_type=PACKAGE)
[![Node.js CI](https://github.com/lwsjs/rewrite/actions/workflows/node.js.yml/badge.svg)](https://github.com/lwsjs/rewrite/actions/workflows/node.js.yml)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

# lws-rewrite

[lws](https://github.com/lwsjs/lws) middleware plugin adding URL rewriting support. For usage instructions see [here](https://github.com/lwsjs/local-web-server/wiki/How-to-rewrite-URLs-to-local-or-remote-destinations).

Adds the following options to lws.

```
--rewrite, -r expression ...   A list of URL rewrite rules. For each rule, separate the 'from' and 'to'
                               routes with '->'. Whitespace surrounded the routes is ignored. E.g. '/from ->
                               /to'.
```

* * *

&copy; 2016-24 Lloyd Brookes \<75pound@gmail.com\>.

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