Skip to content

Massively-WIP no-fuss flat-file PHP-based URL shortener

Notifications You must be signed in to change notification settings

t5r7/beforeyougogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeforeYouGoGo

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.

Perms

Make sure access to /manage is controlled somehow (I just use CloudFlare Access)

Config

NGINX

error_page 404 = /manage/api/404_handler.php;

Caddy

# 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
}

Apache

ErrorDocument 404 /manage/api/404_handler.php

Known Problems

  • 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

About

Massively-WIP no-fuss flat-file PHP-based URL shortener

Resources

Stars

Watchers

Forks