All Projects → lukechilds → Htconvert

lukechilds / Htconvert

Licence: mit
Convert .htaccess redirects to nginx.conf redirects

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Htconvert

Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+8143.27%)
Mutual labels:  cli, nginx, apache
Rare
Fast, realtime regex-extraction, and aggregation into common formats such as histograms, numerical summaries, tables, and more!
Stars: ✭ 76 (-55.56%)
Mutual labels:  nginx, apache
Fail2ban.webexploits
This custom Fail2Ban filter and jail will deal with all scans for common Wordpress, Joomla and other Web Exploits being scanned for by automated bots and those seeking to find exploitable web sites.
Stars: ✭ 67 (-60.82%)
Mutual labels:  nginx, apache
Country Ip Blocks
CIDR country-level IP data, straight from the Regional Internet Registries, updated hourly.
Stars: ✭ 100 (-41.52%)
Mutual labels:  nginx, apache
Netkiller.github.io
Netkiller Free ebook - 免费电子书
Stars: ✭ 861 (+403.51%)
Mutual labels:  nginx, apache
Docs4dev
后端开发常用框架文档及中文翻译,包含 Spring 系列文档(Spring, Spring Boot, Spring Cloud, Spring Security, Spring Session),大数据(Apache Hive, HBase, Apache Flume),日志(Log4j2, Logback),Http Server(NGINX,Apache),Python,数据库(OpenTSDB,MySQL,PostgreSQL)等最新官方文档以及对应的中文翻译。
Stars: ✭ 974 (+469.59%)
Mutual labels:  nginx, apache
Dockerweb
A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.
Stars: ✭ 89 (-47.95%)
Mutual labels:  nginx, apache
Ngxtop
Real-time metrics for nginx server
Stars: ✭ 6,246 (+3552.63%)
Mutual labels:  cli, nginx
Newznab Tmux
Laravel based usenet indexer
Stars: ✭ 127 (-25.73%)
Mutual labels:  nginx, apache
Serverpilot Letsencrypt
Automate the installation of Let's Encrypt SSL on the free plan of ServerPilot
Stars: ✭ 129 (-24.56%)
Mutual labels:  nginx, apache
Arkade
Open Source Kubernetes Marketplace
Stars: ✭ 2,343 (+1270.18%)
Mutual labels:  cli, nginx
Docker Testing
Stars: ✭ 18 (-89.47%)
Mutual labels:  nginx, apache
Ansible Role Htpasswd
Ansible Role - htpasswd
Stars: ✭ 17 (-90.06%)
Mutual labels:  nginx, apache
Ansible Config encoder filters
Ansible role used to deliver the Config Encoder Filters.
Stars: ✭ 48 (-71.93%)
Mutual labels:  nginx, apache
Medusa
🐈Medusa是一个红队武器库平台,目前包括扫描功能(200+个漏洞)、XSS平台、协同平台、CVE监控等功能,持续开发中 http://medusa.ascotbe.com
Stars: ✭ 796 (+365.5%)
Mutual labels:  nginx, apache
Gomplate
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
Stars: ✭ 1,270 (+642.69%)
Mutual labels:  cli, sysadmin
Developer
Gameserver, Voiceserver, Rootserver Webinterface
Stars: ✭ 161 (-5.85%)
Mutual labels:  nginx, apache
Engintron
Engintron for cPanel/WHM is the easiest way to integrate Nginx on your cPanel/WHM server. Engintron will improve the performance & web serving capacity of your server, while reducing CPU/RAM load at the same time, by installing & configuring the popular Nginx webserver to act as a reverse caching proxy in front of Apache.
Stars: ✭ 587 (+243.27%)
Mutual labels:  nginx, apache
Wordops
Install and manage a high performance WordPress stack with a few keystrokes
Stars: ✭ 649 (+279.53%)
Mutual labels:  cli, nginx
Sysbox
sysadmin/scripting utilities, distributed as a single binary
Stars: ✭ 101 (-40.94%)
Mutual labels:  cli, sysadmin

htconvert

Convert .htaccess redirects to nginx.conf redirects.

Build Status Coverage Status npm npm

Install

npm install --global htconvert

Usage

$ cat .htaccess | htconvert > nginxRedirects.conf
# or
$ htconvert -f .htaccess > nginxRedirects.conf

.htaccess

# Frontend Redirects
Redirect 301 /deleted-page/ https://website.com/new-page/
Redirect 302 /new-feature/ https://website.com/coming-soon/

# Admin Redirects
Redirect 301 /admin/ https://website.com/?login=true

nginxRedirects.conf

# Frontend Redirects
location /deleted-page/ {
  return 301 https://website.com/new-page/;
}
location /new-feature/ {
  return 302 https://website.com/coming-soon/;
}

# Admin Redirects
location /admin/ {
  return 301 https://website.com/?login=true;
}

Options

$ htconvert --help

  Usage: htconvert [options]

  Options:

    -h, --help              output usage information
    -V, --version           output the version number
    -f, --file [.htaccess]  File containing .htaccess redirects

Node

This is also usable as a node module

npm install --save htconvert
var htconvert = require('htconvert');
var htaccess = 'Redirect 301 /deleted-page/ https://website.com/new-page/';

htconvert(htaccess);
// `location /deleted-page/ {
//   return 301 https://website.com/new-page/;
// }`

License

MIT © Luke Childs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].