{"_id":"express-rewrite","_rev":"13-addda0f9785e172c3da4f48dda02e27e","name":"express-rewrite","description":"URL rewriting middleware for Express.","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"express-rewrite","description":"URL rewriting middleware for Express.","version":"0.0.1","homepage":"http://github.com/joehewitt/express-rewrite","repository":{"type":"git","url":"git://github.com/joehewitt/express-rewrite.git"},"keywords":["express"],"author":{"name":"Joe Hewitt","email":"joe@joehewitt.com"},"dependencies":{},"engines":{"node":">=0.4.0"},"main":"./rewrite","devDependencies":{},"_id":"express-rewrite@0.0.1","_engineSupported":true,"_npmVersion":"1.0.5","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"c3489fe971be7395e07efd40ee9cca16246b4c3b","tarball":"https://registry.npmjs.org/express-rewrite/-/express-rewrite-0.0.1.tgz","integrity":"sha512-H8mmuZ9IwfMZypUcezIANSKnOnU906p8vXH2ysQyTr9AgYwzwja0sXczqKIGZlyRuvFNQ8Kai9f4sIBCFvsaaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQhdzvY8DD31+p9krBNPuY76eSflUWdOTp8aGJ9BjGnAiB7bK0Tav10pAPe809+ix+NRXRC+3dkpJrAzsmTweIs6Q=="}]},"scripts":{},"maintainers":[{"name":"joehewitt","email":"joe@joehewitt.com"}],"directories":{}},"0.0.2":{"name":"express-rewrite","description":"URL rewriting middleware for Express.","version":"0.0.2","homepage":"http://github.com/joehewitt/express-rewrite","repository":{"type":"git","url":"git://github.com/joehewitt/express-rewrite.git"},"keywords":["express"],"author":{"name":"Joe Hewitt","email":"joe@joehewitt.com"},"dependencies":{},"engines":{"node":">=0.4.0"},"main":"./rewrite","devDependencies":{},"_id":"express-rewrite@0.0.2","_engineSupported":true,"_npmVersion":"1.0.5","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"ebd4654e1d7a83323cf41db7845427fedf276afa","tarball":"https://registry.npmjs.org/express-rewrite/-/express-rewrite-0.0.2.tgz","integrity":"sha512-ggU1hzArM8WrXLsrnYD2hQ33TX8m6IjwaxO8v+bk6qdjKAR7sWYdf6HRDYLHapqMkEpISleLuOT2dlVC0UudJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMKuwvcqZIOcrCoSw//6KPZmG0eL6ZmkeSZkdhx3A14AIgSjD4jA66huHF0mkOUZ5Ao+AyRktFyyHOJbZ9EVwAySE="}]},"scripts":{},"maintainers":[{"name":"joehewitt","email":"joe@joehewitt.com"}],"directories":{}},"0.0.3":{"name":"express-rewrite","description":"URL rewriting middleware for Express.","version":"0.0.3","homepage":"http://github.com/joehewitt/express-rewrite","repository":{"type":"git","url":"git://github.com/joehewitt/express-rewrite.git"},"keywords":["express"],"author":{"name":"Joe Hewitt","email":"joe@joehewitt.com"},"dependencies":{},"engines":{"node":">=0.4.0"},"main":"./rewrite","devDependencies":{},"_id":"express-rewrite@0.0.3","_engineSupported":true,"_npmVersion":"1.0.5","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"1ff4b7b54ca3f77255d34c5dbf4044124b729a85","tarball":"https://registry.npmjs.org/express-rewrite/-/express-rewrite-0.0.3.tgz","integrity":"sha512-j4tUZHqsV4VxG0c4oY30ms9hWkg93vct8ubK3KXIWJ9Y2qUwsFnWEnDR+4TtrsZ15MG4hhX0kF6cKTKG/KBSZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCULTXCGh5FRFIatC9McRfg6+PNrWNGAiwYc1wI+MVCQIhAMAvBMsQp5zrEmG9S+iTixWgjr7D3WwpdmzvhX5vSeDF"}]},"scripts":{},"maintainers":[{"name":"joehewitt","email":"joe@joehewitt.com"}],"directories":{}},"0.0.4":{"name":"express-rewrite","description":"URL rewriting middleware for Express.","version":"0.0.4","homepage":"http://github.com/joehewitt/express-rewrite","repository":{"type":"git","url":"http://github.com/joehewitt/express-rewrite.git"},"keywords":["express"],"author":{"name":"Joe Hewitt","email":"joe@joehewitt.com"},"dependencies":{},"engines":{"node":">=0.4.0"},"main":"./rewrite","bugs":{"url":"https://github.com/joehewitt/express-rewrite/issues"},"_id":"express-rewrite@0.0.4","_shasum":"a8ca2e3d695bba12c31868dfc2719a10e4eac27b","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"joehewitt","email":"joe@joehewitt.com"},"maintainers":[{"name":"joehewitt","email":"joe@joehewitt.com"}],"dist":{"shasum":"a8ca2e3d695bba12c31868dfc2719a10e4eac27b","tarball":"https://registry.npmjs.org/express-rewrite/-/express-rewrite-0.0.4.tgz","integrity":"sha512-WBc/z18XK1vMGOIrUo99r5Hqp8KIkB6ll6D4PDZEZkUCBaYzJdAb5ErvB1ob3egPduLrcb3nc6uzoUNdwExFBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByipRz7pqT6d4xInfwV+FhIMwRPNuxaMW152WmhkUnSAiB44IEsuRIUR/0cVotJ0HpqlmDpJ3wCIZ+nJwjCg1wbRw=="}]},"directories":{}}},"maintainers":[{"name":"joehewitt","email":"joe@joehewitt.com"}],"time":{"modified":"2022-06-17T22:35:49.196Z","created":"2011-09-09T05:10:05.338Z","0.0.1":"2011-09-09T05:10:06.045Z","0.0.2":"2011-09-09T05:16:08.916Z","0.0.3":"2011-09-13T02:50:32.625Z","0.0.4":"2014-05-12T23:38:00.925Z"},"author":{"name":"Joe Hewitt","email":"joe@joehewitt.com"},"repository":{"type":"git","url":"http://github.com/joehewitt/express-rewrite.git"},"readme":"express-rewrite\n===============\n\nExpress middleware for rewriting URLs without doing an http redirect.\n\nUsage\n------------\n\nYou must install the express-rewrite middleware before any other middleware. Repeat: the first time you call server.use(), you must call it on express-rewrite.  This is because it modifies the value of req.url, and you want that to happen before any other middleware looks at the request.\n\n\tvar rewriter = require('express-rewrite');\n\n\tvar server = express.createServer();\n    server.configure(function() {\n        server.use(rewriter);\n\t\tserver.use(server.router);\n\t});\n\nTo rewrite a URL, you use the usual Express routing functions, but with a call to rewriter.rewrite() as the callback.\n\n\tserver.get('/from/some/url', rewriter.rewrite('/to/another/url'));\n\nYou can replace parts of the rewritten URL with matched groups from the original URL. This works the same way as string.replace() when called with a regular expression. Actually, it is a call to string.replace() using the regular expression compiled by the Express router.\n\n\tserver.get('/post/:year/:month', rewriter.rewrite('/post?year=$1&month=$2'));\n\nInstallation\n------------\n\n    $ npm install express-rewrite\n\nLicense \n-------\n\nCopyright 2011 Joe Hewitt\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n \n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","homepage":"http://github.com/joehewitt/express-rewrite","keywords":["express"],"bugs":{"url":"https://github.com/joehewitt/express-rewrite/issues"},"readmeFilename":"README.md","users":{"retorillo":true,"knoja4":true}}