]> git.plutz.net Git - invoices/commitdiff
bugfix _BASE url
authorPaul Hänsch <paul@plutz.net>
Fri, 1 Dec 2023 16:41:13 +0000 (17:41 +0100)
committerPaul Hänsch <paul@plutz.net>
Fri, 1 Dec 2023 16:41:13 +0000 (17:41 +0100)
index.cgi

index 47941461acd93562182dbaeb3204841bda4ef933..ebdaf5395a78535dac3b5c3f6ed105fd3e317fd5 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -58,7 +58,7 @@ fi >&2
       debug "TID mismatch updating $file"
     fi
     if [ $(POST action) = update_invoice_return ]; then
-      REDIRECT "${_BASE}"
+      REDIRECT "${_BASE}/"
     else
       REDIRECT "${_BASE}$PATH_INFO"
     fi
@@ -83,7 +83,7 @@ fi >&2
     REDIRECT "${_BASE}/pdf/${id}/$(URL "${filenamestring}.pdf")"
     ;;
   *)
-    REDIRECT "${_BASE}"
+    REDIRECT "${_BASE}/"
     ;;
 esac
 
@@ -96,7 +96,7 @@ esac
     ;;
   /doc/*)
     id="${PATH_INFO##*/}" tid="$(transid "${_DATA}/${id}.kvd")"
-    DB3 open "${_DATA}/${id}.kvd" || REDIRECT "${_BASE}"
+    DB3 open "${_DATA}/${id}.kvd" || REDIRECT "${_BASE}/"
     type="$(DB3 get type)"
     [ -d "${_EXEC}/${type}/" ] \
     && . "${_EXEC}/${type}/form.sh"
@@ -106,6 +106,6 @@ esac
     id="${PATH_INFO#/pdf/}" id="${id%%/*}"
     FILE "$_DATA/export/${id}.pdf"
     ;;
-  *) REDIRECT "${_BASE}"
+  *) REDIRECT "${_BASE}/"
     ;;
 esac