Skip to content

bigwhoop/caddy-redir-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caddy-redir-file

A caddy plugin to load a list of redirects from a file. It's very simple. And I've only hacked it together in a few hours. I'd not advise you to use it in production ...

Installation

Build caddy with xcaddy:

xcaddy build --with github.com/bigwhoop/caddy-redir-file
mv caddy /usr/bin/caddy 

Configuration

Caddyfile

{
    order redir_file first
}

www.domain.com {
    redir_file {
        path "/path/to/redirects.csv"
        type "csv"
        csv_separator ";"
    }
}

/path/to/redirects.csv

from;to
/from-here;/to-here
/and-here;/to-here

Development

cd <repo>
xcaddy build --with github.com/bigwhoop/caddy-redir-file=./ --output caddy
./caddy run --config example/Caddyfile

Visit http://localhost:8090/from/here.

License

MIT

About

Mass redirects in caddy using a CSV file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages