connect-url-rewrite
Connect/Express middleware for rewriting URLs using regular expressions (like mod_rewrite).
Last updated 8 years ago by loopj .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install connect-url-rewrite 
SYNC missed versions from official npm registry.

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));

Current Tags

  • 0.1.0                                ...           latest (8 years ago)

1 Versions

  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 66
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |