Massively-WIP no-fuss flat-file PHP-based URL shortener. Created because everything else was too complicated; I just wanted something you can shove on a web server and not care about.
Make sure access to /manage is controlled somehow (I just use CloudFlare Access)
error_page 404 = /manage/api/404_handler.php;
# Version 2
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /manage/api/404_handler.php
file_server
}
# Version 1
errors {
404 /manage/api/404_handler.php
}
ErrorDocument 404 /manage/api/404_handler.php
- Code quality is awful (some things have three layers of checks but others have nothing)
- We should use SQLite instead of a text file but that's more effort