diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 20:41:53 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 20:41:53 -0500 |
commit | 8b6bc295a129d0f5f6e2163fb8d57347942d71d9 (patch) | |
tree | 2e30fe2cdb24188abd47a390bfb4ec711dddcf09 /bin | |
parent | 3290015d64bf739adb00da719dfe15ae5165c840 (diff) |
implement case-insensitive URLs
Diffstat (limited to 'bin')
-rw-r--r-- | bin/lowercase.cgi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/lowercase.cgi b/bin/lowercase.cgi new file mode 100644 index 0000000..376ad54 --- /dev/null +++ b/bin/lowercase.cgi @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +uri="${REQUEST_SCHEME:-http}://${HTTP_HOST}${PATH_INFO}" +if test -n "$QUERY_STRING"; then + uri+="?$QUERY_STRING" +fi +printf '%s\r\n' \ + "Location: $uri" \ + '' |