2022.12.0 • Published 1 year ago

express-middleware-redirector v2022.12.0

Weekly downloads
7
License
MIT
Repository
github
Last release
1 year ago

express-middleware-redirector

test-all

How to configure

minimum

All requests are redirect to same path on https://dest.example.com.

e.g.

  • / :arrow_forward: https://dest.example.com/
  • /path/to/content-a :arrow_forward: https://dest.example.com/path/to/content-a
  • ...
{
  "destination": {
    "baseUrl": "https://dest.example.com"
  }
}

More complex example

  • /pages/about-us :arrow_forward: https://brand‐new.example.com/about
  • /pages/access and /pages/office-location :arrow_forward: https://brand‐new.example.com/access
  • other all requests are redirect to https://brand‐new.example.com/news/we-have-moved
{
  "destination": {
    "baseUrl": "https://brand‐new.example.com",
    "fallbackPath": "/news/we-have-moved"
  },
  "contentMappings": [
    {
      "fromPath": "/pages/about-us",
      "toPath": "/about"
    },
    {
      "fromPath": ["/pages/access", "/pages/office-location"],
      "toPath": "/access"
    }
  ]
}
2022.12.0

1 year ago

2020.9.0

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago