www-redirect
v1.0.4
Published
Redirect 'www' to 'non-www' and 'non-www' to 'www' in NodeJs (Express). (example.com to www.example.com or www.example.com to example.com)
Downloads
4
Maintainers
Readme
Redirect 'www' to 'non-www' and 'non-www' to 'www' in NodeJs(Express). (example.com to www.example.com or www.example.com to example.com)
🏠 Homepage
Prerequisites
- npm >=5.5.0
- node >=9.3.0
Install
npm i www-redirect
Usage
const express = require("express");
const redirect = require("www-redirect");
const app = express();
// app.use(redirect(option)); // option = 'www' or option = 'non-www'
// 'www' option for redirecting non-www to www and 'non-www'option for redirecting www to non-www
app.use(redirect("non-www"));
Author
👤 Shubhadeep
- Websites: https://insload.com | https://deepxnet.com
- Twitter: @shubhaX
- GitHub: @deepx-coder
- LinkedIn: @shubha-deep-halder
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2021 Shubhadeep. This project is MIT licensed.