#!/usr/bin/env ruby
require 'cgi'
cgi = CGI::new( "html3" )
if cgi.key?( 'redirect' )
  puts "Location: #{cgi.params['redirect'][0]}\n\n"
else
  cgi.out(){
    "<html><body>" +
    "Use redirect=http://... <br>" +
    "<b>" + CGI::escapeHTML( ENV['QUERY_STRING'] ) + "</b>" +
    "</body></html>"
  }
end
