[ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
[ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
+debug() { :; }
+
. "$_EXEC/cgilite/cgilite.sh"
. "$_EXEC/cgilite/session.sh"
topdir="${_PATH#/}"
topdir="/${topdir%%/*}"
-if [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then
+if [ "${_PATH}" = / ]; then
+ REDIRECT /cards/
+elif [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then
. "${_EXEC}/${_PATH}/index.cgi"
elif [ ! -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}" ]; then
. "${_EXEC}/${_PATH}"