mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

htmlredirect (394B)


      1 #!/bin/bash
      2 
      3 # output code of a HTML redirect to $1 (should not contain ',')
      4 
      5 cat <<EOF | sed 's,URL,'$1',g'
      6 <!DOCTYPE html>
      7 <html dir="ltr" xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
      8   <head>
      9   <title>Redirect</title>
     10   <meta http-equiv="refresh" content="0; url=URL" />
     11   </head>
     12   <body>
     13     <p>You are redirected to <a href="URL">URL</a>.</p>
     14   </body>
     15 </html>
     16 EOF