{"_id":"express-force-domain","_rev":"27-5ea9bc427a7c167c04b666ef40396f44","name":"express-force-domain","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"express-force-domain","version":"0.0.1","keywords":["express","domains","redirect"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.1","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"378ba1b11525e53f28bb054d8ba8622527076023","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.1.tgz","integrity":"sha512-S0D0+SmJzC/4/wmalDJeDv1FlL3OkbGmRpyIo5AwMskrmtOxSjMrxD+OoC7WUdUhIK2GsG03zgmvhq1W2djUKg==","signatures":[{"sig":"MEUCIHRmUyndswQbcZIE7icPu9fP6Y+rINdYbbQB8RvZxRI+AiEAhvehXaV35s4MF+I/ocCOkOGZPxRHBSGDrnvXDLysOc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\n\nUsage\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('./express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples):\n\n\tapp.all('*', require('./express-force-domain')('http://example.com') );\n\tapp.all('*', require('./express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('./express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('./express-force-domain')('http://www.example.com:8080') );\n\n\nParked domains, assuming example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('./express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","directories":{}},"0.0.2":{"name":"express-force-domain","version":"0.0.2","keywords":["express","domains","redirect"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.2","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"c5852557905ce3a512b4d1bc75ce665027020c67","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.2.tgz","integrity":"sha512-l4TDOaZZg1rNvhUTadWK3C9I7SiNpjERquhpuRR36eOUdm2S0tG9+pXjEZgUTEOgaa+je7C0Z5GRpXkQu4l5Pg==","signatures":[{"sig":"MEYCIQCma3dnApthuYqddZJrMYek0K1yHxDzz80CMGKsXKqUnQIhAKuD0+qgo7J31a+DR+kmvZCWT526uHs9LYYDG/IZhPeH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\nSee the package on npm: https://npmjs.org/package/express-force-domain\n\nUsage\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nor use config variable:\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples, pick one):\n\n\tapp.all('*', require('express-force-domain')('http://example.com') );\n\tapp.all('*', require('express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com:8080') );\n\n\nFor parked domains you want to redirect, this assumes example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","directories":{},"dependencies":{"express":"3.x"}},"0.0.3":{"name":"express-force-domain","version":"0.0.3","keywords":["express","domains","redirect"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.3","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"db0298b4ec6862d77005655d9f9d828ae6274947","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.3.tgz","integrity":"sha512-G1UM7oNAx/3ut4vgWvgF7kcn5JGHjlRNCEyKHEc19x6tq2qC96bjwCEaewuPVWEWEmfWMBs4Rplzd3p1lvJ5tg==","signatures":[{"sig":"MEQCIEGLeHaXKESYR430eB1vqqTLGmDd5GMkjA1aoaSz4xt8AiAU/R9UP5H2eZZIbs6qs3AwPuqm+z2jBEBzRfK7cYQUMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\nSee the package on npm: https://npmjs.org/package/express-force-domain\n\nUsage\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nor use config variable:\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples, pick one):\n\n\tapp.all('*', require('express-force-domain')('http://example.com') );\n\tapp.all('*', require('express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com:8080') );\n\n\nFor parked domains you want to redirect, this assumes example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n\nLICENSE\n----\n\n(The MIT License)\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","dependencies":{"express":"3.x"},"directories":{}},"0.0.4":{"name":"express-force-domain","version":"0.0.4","keywords":["express","domains","redirect"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.4","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"a943482653c4688b1a5ebfd003f666a4b0b33321","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.4.tgz","integrity":"sha512-7zeAfqT1DH0ZCUJv0kNbbfE7crY4TkOHI0KEbDpGjJTwlAa4doZ0FSSE/xyn6f/pDj8gwhTAxibwV6Q5PJPDFQ==","signatures":[{"sig":"MEUCIGg8IrL7n0SZeIz8eZ7d7m2b4P4GvYiSV+MXl1JiKDq2AiEApaJluB4jPXHAopAdCyhyPb74dYe0H0GZRZc4u5UQjFo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\nSee the package on npm: https://npmjs.org/package/express-force-domain\n\nUsage\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nor use config variable:\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples, pick one):\n\n\tapp.all('*', require('express-force-domain')('http://example.com') );\n\tapp.all('*', require('express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com:8080') );\n\n\nFor parked domains you want to redirect, this assumes example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nYou can also use as middleware with connect and app.use(), if you are not using express: \n\n\tapp.use(require('express-force-domain')('http://www.example.com') );\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n* http://www.senchalabs.org/connect/\n\nLICENSE\n----\n\n(The MIT License)\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x or Connect to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","directories":{}},"0.0.5":{"name":"express-force-domain","version":"0.0.5","keywords":["express","domains","redirect","connect","seo"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.5","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"de189f69cc3430a6327b4dc4246628f9468f1246","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.5.tgz","integrity":"sha512-uR18e0qSs7KoK5/nkdZJtA1VFjqwMy0xT6mK1AdZ2KzOhWwOzd6ob1Dn711uZaDkaFix7xJ4YaqDvo4e8Ly/pw==","signatures":[{"sig":"MEYCIQDXL1E0XMUmFGHIROsZRtUhf/kVPHsO5UkXNhDs8G/x4gIhAO5Tr/2e/JyYlWIDnk63EALZfshp8u50JHTK4VjPNeTw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\nSee the package on npm: https://npmjs.org/package/express-force-domain\n\nUsage with Express\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nor use config variable:\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples, pick one):\n\n\tapp.all('*', require('express-force-domain')('http://example.com') );\n\tapp.all('*', require('express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('express-force-domain')('http://www.example.com:8080') );\n\n\nFor parked domains you want to redirect, this assumes example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nUsage with Connect\n----\n\nYou can also use as middleware with connect and app.use(), if you are not using express: \n\n\tapp.use(require('express-force-domain')('http://www.example.com') );\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n* http://www.senchalabs.org/connect/\n\nLICENSE\n----\n\n(The MIT License)\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x or Connect to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","directories":{}},"0.0.6":{"name":"express-force-domain","version":"0.0.6","keywords":["express","domains","redirect","connect","seo"],"author":{"url":"chovy","name":"Anthony Ettinger"},"license":"MIT","_id":"express-force-domain@0.0.6","maintainers":[{"name":"chovy","email":"anthony@chovy.com"}],"dist":{"shasum":"4c3dd010aa49adacddc3e05fc7780c6df9d5d645","tarball":"https://registry.npmjs.org/express-force-domain/-/express-force-domain-0.0.6.tgz","integrity":"sha512-CYw0UbvES5b7e5L1N4pH9Yub/ze+CGLqf6HEpz5R8HdjWknOfxWXKQ40eiGYOF0RwXAxHy0qJt7Ezivf4MNFQg==","signatures":[{"sig":"MEQCIF5oWWp7OgHRaOjSCzr7XftBZ0SK3qNpRu2/MQK79dp/AiBLvjtheICr6mmIdgIMaqsSE7qhuXF17OIB8+l12gFx/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/express-force-domain.js","readme":"Express Force Domain\n===========\n\nForce Express 3.x or Connect to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\nSee the package on npm: https://npmjs.org/package/express-force-domain\n\nUsage with Connect or Express\n----\n\nYou can also use as middleware with connect and app.use(), if you are not using express. \n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tapp.use( require('express-force-domain')('http://www.example.com') );\n\nor\n\n\tvar\tforce = require('express-force-domain');\n\tapp.use( force('http://www.example.com') );\n\nor alternative port\n\n\tapp.use( force('http://example.com:8080') );\n\nNote, be sure to put the app.use statement above the app.router.\n\n\tvar cfg = require('./config')\n\t, force = require('express-force-domain');\n\n\tapp.use( force(cfg.site_url) );\n\t...\n\tapp.use(app.router);\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t, force = require('express-force-domain');\n\n\tapp.use( force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples, pick one):\n\n\tapp.use( require('express-force-domain')('http://example.com') );\n\tapp.use( require('express-force-domain')('http://example.com:8080') );\n\tapp.use( require('express-force-domain')('http://www.example.com') );\n\tapp.use( require('express-force-domain')('http://www.example.com:8080') );\n\nFor parked domains you want to redirect, this assumes example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.use( require('express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n* http://www.senchalabs.org/connect/\n\nLICENSE\n----\n\n(The MIT License)\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"chovy","email":"anthony@chovy.com"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"_npmVersion":"1.1.61","description":"Force express 3.x or Connect to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","directories":{}}},"time":{"created":"2012-10-05T23:30:58.470Z","modified":"2026-07-31T17:50:25.943Z","0.0.1":"2012-10-05T23:31:01.277Z","0.0.2":"2012-10-06T00:00:53.982Z","0.0.3":"2012-10-06T00:27:07.802Z","0.0.4":"2012-10-22T08:36:02.460Z","0.0.5":"2012-10-22T08:43:53.711Z","0.0.6":"2012-11-09T06:07:20.523Z"},"author":{"url":"chovy","name":"Anthony Ettinger"},"repository":{"url":"git://github.com/chovy/express-force-domain.git","type":"git"},"description":"Force express 3.x or Connect to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.","keywords":["express","domains","redirect","connect","seo"],"license":"MIT","maintainers":[{"email":"anthony@chovy.com","name":"moshcoder"}],"readme":"Express Force Domain\n===========\n\nForce Express 3.x to use a specific domain. Good for adding or removing the www. from your web app and handling parked domains that redirect to your main domain. You just have to pass in the preferred url to your homepage (ie: http://www.example.com).\n\nFor test environments, you need to pass port as well if using something other than port 80. (ie: http://www.example.com:8080).\n\nIf example2.com points to the same IP as example1.com you can handle the redirect using express-force-domain.\n\nInstalling\n----\n\n\tnpm install express-force-domain --save\n\n--save will add the package to your package.json file automatically.\n\n\nUsage\n----\n\nSetup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):\n\n\tvar cfg = require('./config');\n\tapp.all('*', require('./express-force-domain')(cfg.site_url) );\n\nAlternative:\n\n\tvar site_url = 'http://www.example.com'\n\t,\tforce = require('express-force-domain');\n\n\tapp.all('*', force(site_url) );\n\n\nor you can pass the url for the homepage manually, (four examples):\n\n\tapp.all('*', require('./express-force-domain')('http://example.com') );\n\tapp.all('*', require('./express-force-domain')('http://example.com:8080') );\n\tapp.all('*', require('./express-force-domain')('http://www.example.com') );\n\tapp.all('*', require('./express-force-domain')('http://www.example.com:8080') );\n\n\nParked domains, assuming example2.com points to the same ip as example.com, and you prefer your app live at http://www.example.com:\n\n\tapp.all('*', require('./express-force-domain')('http://www.example.com') );\n\nRequests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.\n\nMore info\n----\n\n* http://nodejs.org/\n* http://expressjs.com/\n* http://npmjs.org/\n\n","users":{}}