Connect/Express middleware for rewriting URLs using regular expressions (like mod_rewrite).
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
README.md
package.json

README.md

Connect/Express URL Redirect Middleware

Connect/Express middleware for rewriting URLs using regular expressions (like mod_rewrite).

Usage

// Require the middleware
rewrite = require("connect-url-rewrite");

// Build your redirect rules
rules = [
  "^\/example.html /redirected.html"
]

// Add the middleware to the stack
app.use(rewrite(rules));