URI: 
       tREADME.md - bitreich-short - Fork of bitreich-httpd to shorten URLs
  HTML git clone git://git.z3bra.org/bitreich-short.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       tREADME.md (1080B)
       ---
            1 # URL Shortner
            2 
            3 Shorten URL sent as PUT requests, and generate redirection for shorten
            4 URLs. This service is based on the Bitreich HTTPD inet daemon [0].
            5 
            6 This simple service is meant to be used with inetd(8) or xinetd(8).
            7 
            8 [0]: gopher://bitreich.org/1/scm/bitreich-httpd
            9 
           10 ## Installation
           11 
           12         % make
           13         % make install
           14         % cp http-stream /etc/xinetd.d
           15         # Edit /etc/xinetd.d/http-stream to your needs.
           16 
           17 ## Configuration
           18 
           19 Edit bitreich-httpd.c macro WWWBASE to the short links location. You
           20 can optionally change CHARSET and NAMELEN to change how the shortened
           21 URL would look like.
           22 
           23 Don't forget to update variable `host` to match you server hostname.
           24 "localhost" is fine if you don't intend to share those URLs.
           25 
           26 ## Usage
           27 
           28 URL to be shortened must be sent as PUT requests:
           29 
           30     $ curl -X PUT -d "https://z3bra.org/slj" http://localhost
           31     http://localhost/txw
           32 
           33 The shortened URL can then be accessed with a simple GET request. Note
           34 that the server will return the HTTP code 307 (Moved Temporarily),
           35 so your client must be able to follow redirection.
           36 
           37     $ curl -L http://localhost/txw