Fix broken version links when sub-directory hosting

APP_PREFIX when in the root directory in "/", but when in a subdirectory, "/subdir"