This is a parser for the IPFS Web Gateway's _redirects
file format.
Follow specification work at ipfs/specs#290
Currently only supports from
, to
and status
.
from to [status]
# Implicit 301 redirects
/home /
/blog/my-post.php /blog/my-post
/news /blog
/google https://www.google.com
# Redirect with a 301
/home / 301
# Redirect with a 302
/my-redirect / 302
# Rewrite a path
/pass-through /index.html 200
# Show a custom 404 for everything under this path
/ecommerce/* /store-closed 404
# Single page app rewrite
/* /index.html 200
# Proxying
/api/* https://api.example.com/:splat 200
This project was forked from tj/go-redirects. Thank you TJ for the initial work. 🙏